diff options
-rw-r--r-- | rtty.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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()); |