aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/9term/9term.c13
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