fork filter procs with RFREND in various programs

This commit is contained in:
cinap_lenrek 2014-02-21 05:32:20 +01:00
parent fef5c8e4ca
commit 0181117b5f
3 changed files with 4 additions and 4 deletions

View file

@ -301,7 +301,7 @@ old9p(int fd)
if(pipe(p) < 0)
fatal("pipe: %r");
switch(rfork(RFPROC|RFMEM|RFFDG|RFNAMEG)) {
switch(rfork(RFPROC|RFMEM|RFFDG|RFNAMEG|RFREND)) {
case -1:
fatal("rfork srvold9p: %r");
case 0:
@ -760,7 +760,7 @@ filter(int fd, char *host)
if(filterp == nil)
return fd;
procsetname("filter %s", filterp);
flags = RFNOWAIT|RFPROC|RFMEM|RFFDG;
flags = RFNOWAIT|RFPROC|RFMEM|RFFDG|RFREND;
if(host == nil){
/* remote side */
if(announce(anstring, addr) < 0)

View file

@ -1404,7 +1404,7 @@ showext(Page *p)
fd = dup(fd, -1);
seek(fd, 0, 0);
}
if(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFNOWAIT) == 0){
if(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFREND|RFNOWAIT) == 0){
if(newwindow(nil) != -1){
dupfds(fd, open("/dev/cons", OWRITE), open("/dev/cons", OWRITE), -1);
if((fd = open("/dev/label", OWRITE)) >= 0){

View file

@ -562,7 +562,7 @@ pipeline(char *fmt, ...)
va_end(a);
if(pipe(p) < 0)
return -1;
switch(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG)){
switch(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFREND)){
case -1:
close(p[0]);
close(p[1]);