Index: tinit.c =================================================================== --- tinit.c (revision 253873) +++ tinit.c (working copy) @@ -260,8 +260,10 @@ int fds[3] = {0, 1, 2}, i; close(0); - if(open(ttp->devname, O_RDWR) == -1) + if(open(ttp->devname, O_RDWR) == -1){ + ttp->pid = -1; return(-1); + } dup2(0, 1); dup2(1, 2);