aboutsummaryrefslogtreecommitdiff
path: root/rtty.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtty.c')
-rw-r--r--rtty.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rtty.c b/rtty.c
index f54d3b2..0eb26f8 100644
--- a/rtty.c
+++ b/rtty.c
@@ -1,6 +1,7 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
@@ -10,6 +11,12 @@
#define INIT "export TERM=tty43 EDITOR=ed PAGER='pr -ptl23'\n"
#define MAXBUF 2048
+void
+sigchld()
+{
+ exit(0);
+}
+
int
main(int argc, char *argv[])
{
@@ -18,6 +25,8 @@ main(int argc, char *argv[])
int fdin, fdout, i, n;
struct timeval tv;
+ signal(SIGCHLD, sigchld);
+
/* Create named pipes. */
sprintf(in, "/var/tmp/rtty.in.%d", getpid());
sprintf(out, "/var/tmp/rtty.out.%d", getpid());