tignore spurious sigchilds on sunos - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit e45084490f79169a95eda5c6b8efa8814c5f7f79
DIR parent 005a85f3a2ef85ec1a64ce05a486c84e25cf6f94
HTML Author: rsc <devnull@localhost>
Date: Fri, 7 Jan 2005 17:06:01 +0000
ignore spurious sigchilds on sunos
Diffstat:
M src/cmd/9term/9term.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
DIR diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
t@@ -314,8 +314,16 @@ hangupnote(void *a, char *msg)
noted(NDFLT);
}
if(strstr(msg, "child")){
- /* bug: do better */
- threadexitsall(0);
+ char buf[128];
+ int n;
+
+ n = awaitnohang(buf, sizeof buf-1);
+ if(n > 0){
+ buf[n] = 0;
+ if(atoi(buf) == rcpid)
+ threadexitsall(0);
+ }
+ noted(NCONT);
}
noted(NDFLT);
}
t@@ -1520,7 +1528,6 @@ backnl(uint p, uint n)
return p;
p--;
}
- return 0; /* alef bug */
}
void