diff options
author | rsc <devnull@localhost> | 2005-01-07 17:06:01 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-07 17:06:01 +0000 |
commit | e45084490f79169a95eda5c6b8efa8814c5f7f79 (patch) | |
tree | 03ceb4152e78fbfe9e1fb8b2a27fd695515ad741 | |
parent | 005a85f3a2ef85ec1a64ce05a486c84e25cf6f94 (diff) | |
download | plan9port-e45084490f79169a95eda5c6b8efa8814c5f7f79.tar.gz plan9port-e45084490f79169a95eda5c6b8efa8814c5f7f79.tar.bz2 plan9port-e45084490f79169a95eda5c6b8efa8814c5f7f79.zip |
ignore spurious sigchilds on sunos
-rw-r--r-- | src/cmd/9term/9term.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index a06c58fd..257b87ba 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -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); } @@ -1520,7 +1528,6 @@ backnl(uint p, uint n) return p; p--; } - return 0; /* alef bug */ } void |