diff --git a/usr.bin/window/wwinit.c b/usr.bin/window/wwinit.c index 074731984f13..b22eaf9bf325 100644 --- a/usr.bin/window/wwinit.c +++ b/usr.bin/window/wwinit.c @@ -314,6 +314,7 @@ wwinit() wwerrno = WWE_SYS; goto bad; } + fcntl(0,F_SETOWN,getpid()); /* catch typeahead before ASYNC was set */ (void) kill(getpid(), SIGIO); wwstart1(); diff --git a/usr.bin/window/wwspawn.c b/usr.bin/window/wwspawn.c index 3588dd88150c..57e2f666ef62 100644 --- a/usr.bin/window/wwspawn.c +++ b/usr.bin/window/wwspawn.c @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)wwspawn.c 8.1 (Berkeley) 6/6/93"; #include /* - * There is a dead lock with fork and closing of pseudo-ports. + * There is a dead lock with vfork and closing of pseudo-ports. * So we have to be sneaky about error reporting. */ wwspawn(wp, file, argv) @@ -56,7 +56,7 @@ char **argv; int s; s = sigblock(sigmask(SIGCHLD)); - switch (pid = fork()) { + switch (pid = vfork()) { case -1: wwerrno = WWE_SYS; ret = -1;