handle interrupts and backgrounded processes a little better.

This commit is contained in:
rsc 2004-03-26 17:30:36 +00:00
parent 25e0e4f334
commit 69ab5d3d49
3 changed files with 11 additions and 1 deletions

View file

@ -63,6 +63,7 @@ void Xsimple(void){
Xerror("try again");
return;
case 0:
rfork(RFNOTEG);
pushword("exec");
execexec();
strcpy(buf, "can't exec: ");
@ -70,10 +71,12 @@ void Xsimple(void){
errstr(buf+n, ERRMAX-n);
Exit(buf);
default:
kidpid = pid;
poplist();
/* interrupts don't get us out */
while(Waitfor(pid, 1) < 0)
;
kidpid = 0;
}
}
}