fork filter procs with RFREND in various programs
This commit is contained in:
parent
fef5c8e4ca
commit
0181117b5f
3 changed files with 4 additions and 4 deletions
|
@ -301,7 +301,7 @@ old9p(int fd)
|
||||||
if(pipe(p) < 0)
|
if(pipe(p) < 0)
|
||||||
fatal("pipe: %r");
|
fatal("pipe: %r");
|
||||||
|
|
||||||
switch(rfork(RFPROC|RFMEM|RFFDG|RFNAMEG)) {
|
switch(rfork(RFPROC|RFMEM|RFFDG|RFNAMEG|RFREND)) {
|
||||||
case -1:
|
case -1:
|
||||||
fatal("rfork srvold9p: %r");
|
fatal("rfork srvold9p: %r");
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -760,7 +760,7 @@ filter(int fd, char *host)
|
||||||
if(filterp == nil)
|
if(filterp == nil)
|
||||||
return fd;
|
return fd;
|
||||||
procsetname("filter %s", filterp);
|
procsetname("filter %s", filterp);
|
||||||
flags = RFNOWAIT|RFPROC|RFMEM|RFFDG;
|
flags = RFNOWAIT|RFPROC|RFMEM|RFFDG|RFREND;
|
||||||
if(host == nil){
|
if(host == nil){
|
||||||
/* remote side */
|
/* remote side */
|
||||||
if(announce(anstring, addr) < 0)
|
if(announce(anstring, addr) < 0)
|
||||||
|
|
|
@ -1404,7 +1404,7 @@ showext(Page *p)
|
||||||
fd = dup(fd, -1);
|
fd = dup(fd, -1);
|
||||||
seek(fd, 0, 0);
|
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){
|
if(newwindow(nil) != -1){
|
||||||
dupfds(fd, open("/dev/cons", OWRITE), open("/dev/cons", OWRITE), -1);
|
dupfds(fd, open("/dev/cons", OWRITE), open("/dev/cons", OWRITE), -1);
|
||||||
if((fd = open("/dev/label", OWRITE)) >= 0){
|
if((fd = open("/dev/label", OWRITE)) >= 0){
|
||||||
|
|
|
@ -562,7 +562,7 @@ pipeline(char *fmt, ...)
|
||||||
va_end(a);
|
va_end(a);
|
||||||
if(pipe(p) < 0)
|
if(pipe(p) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
switch(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG)){
|
switch(rfork(RFPROC|RFMEM|RFFDG|RFNOTEG|RFREND)){
|
||||||
case -1:
|
case -1:
|
||||||
close(p[0]);
|
close(p[0]);
|
||||||
close(p[1]);
|
close(p[1]);
|
||||||
|
|
Loading…
Reference in a new issue