+
+reapchild()
+{
+ union wait status;
+ int pid;
+
+ while ((pid = wait3(&status, WNOHANG, 0)) > 0)
+ dprintf(debug, "%d: child exits with signal %d status %d\n",
+ pid, status.w_termsig, status.w_retcode),
+ fflush (debug);
+}
+
+untty()
+{
+ int i;
+
+ i = open("/dev/tty", O_RDWR);
+ if (i >= 0) {
+ ioctl(i, TIOCNOTTY, (char *)0);
+ (void) close(i);
+ }
+}