aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--src/cmd/9term/Linux.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 4a200cdc..21efdc2d 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -5,6 +5,7 @@
Albert Lee <trisk@acm.jhu.edu>
André Günther <Andre.G@gmx.de>
+Anthony Martin <ality@pbrane.org>
Anthony Sorace <a@9srv.net>
Arvindh Rajesh Tamilmani <art@a-30.net>
Benjamin Huntsman <BHuntsman@mail2.cu-portland.edu>
diff --git a/src/cmd/9term/Linux.c b/src/cmd/9term/Linux.c
index a9bf6f9a..449ddde6 100644
--- a/src/cmd/9term/Linux.c
+++ b/src/cmd/9term/Linux.c
@@ -1,13 +1,18 @@
#define getpts not_using_this_getpts
#include "bsdpty.c"
#undef getpts
+#include <signal.h>
int
getpts(int fd[], char *slave)
{
+ void (*f)(int);
+
+ f = signal(SIGCHLD, SIG_DFL);
if(openpty(&fd[1], &fd[0], NULL, NULL, NULL) >= 0){
fchmod(fd[1], 0620);
strcpy(slave, ttyname(fd[0]));
+ signal(SIGCHLD, f);
return 0;
}
sysfatal("no ptys");