- r= dup2(pfd[0],0); eassert(!r);
- r= close(pfd[1]); eassert(!r);
- execlp("./show-thing.tcl", "./show-thing.tcl",(char*)0);
+ r= dup2(jobpipe[0],0); eassert(r==0);
+ r= close(jobpipe[1]); eassert(!r);
+ r= close(donepipe[0]); eassert(!r);
+ /* we know donepipe[1] is >= 4 and we have dealt with all the others
+ * so we aren't in any danger of overwriting some other fd 4: */
+ r= dup2(donepipe[1],4); eassert(r==4);
+ execlp("./show-thing.tcl", "./show-thing.tcl","--automatic",(char*)0);