shithub: riscv

Download patch

ref: 69e8a53ffe6c4d6032ba9425c89ac8b564aaf43b
parent: 361e0295412093487ecf430d4bc3e392914bce9c
author: cinap_lenrek <[email protected]>
date: Tue Jan 22 05:35:42 EST 2013

9660srv: run 9p service in separate namespace to prevent deadlock

we have to run the 9p service process in its own namespace
otherwise the attach filename might point onto the served
filesystem causing it to deadlock. this happens especially
if 9660srv is used as root filesystem. (cdboot)

--- a/sys/src/cmd/9660srv/main.c
+++ b/sys/src/cmd/9660srv/main.c
@@ -140,7 +140,7 @@
 	}
 	srvfd = pipefd[1];
 
-	switch(rfork(RFNOWAIT|RFNOTEG|RFFDG|RFPROC)){
+	switch(rfork(RFNOWAIT|RFNOTEG|RFFDG|RFPROC|RFNAMEG)){
 	case -1:
 		panic(1, "fork");
 	default: