we do not need to wait for fork/execed program to finish when
not collecting waitmsg. this reduces the number of rio
processes hanging arround for each window shell just waiting
for it to terminate and then dumping the waitmsg.
int
_schedexec(Execargs *e)
{
- int pid;
+ int pid, flag;
- switch(pid = rfork(RFREND|RFNOTEG|RFFDG|RFMEM|RFPROC)){
+ flag = (_threadwaitchan == nil) ? RFNOWAIT : 0;
+ switch(pid = rfork(RFREND|RFNOTEG|RFFDG|RFMEM|RFPROC|flag)){
case 0:
efork(e);
default: