aux/listen: rfork with RFREND

child processes handling the connection should be all
independent of each another and not share rendezvous
group. the rendezvous group sharing caused a bug in
exportfs when we switched from using pid to memory
address as rendezvous tag.
This commit is contained in:
cinap_lenrek 2014-02-21 05:29:43 +01:00
parent 40d71baf7f
commit fef5c8e4ca
2 changed files with 2 additions and 2 deletions

View file

@ -456,7 +456,7 @@ dolisten(char *proto, char *dir, int ctl, char *srvdir, char *dialstr, long *pch
/*
* start a subprocess for the connection
*/
switch(rfork(RFFDG|RFPROC|RFMEM|RFENVG|RFNAMEG|RFNOTEG|nowait)){
switch(rfork(RFFDG|RFPROC|RFMEM|RFENVG|RFNAMEG|RFNOTEG|RFREND|nowait)){
case -1:
reject(nctl, ndir, "host overloaded");
close(nctl);

View file

@ -118,7 +118,7 @@ main(int argc, char **argv)
if(nctl < 0)
sysfatal("listen %s: %r", argv[0]);
switch(rfork(RFFDG|RFPROC|RFMEM|RFENVG|RFNAMEG|RFNOTEG|nowait)){
switch(rfork(RFFDG|RFPROC|RFMEM|RFENVG|RFNAMEG|RFNOTEG|RFREND|nowait)){
case -1:
reject(nctl, ndir, "host overloaded");
close(nctl);