aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-10-17 05:29:53 +0000
committerrsc <devnull@localhost>2004-10-17 05:29:53 +0000
commitf002cc17a63794af58bfde55a95b7c7fd6551d9a (patch)
tree13355ff84d7ac9556c1df4bcd24a2ed27bd09970 /src/cmd/rc
parent39cff6e750c0ae587cbcb9ae771ed43fd6bbf362 (diff)
downloadplan9port-f002cc17a63794af58bfde55a95b7c7fd6551d9a.tar.gz
plan9port-f002cc17a63794af58bfde55a95b7c7fd6551d9a.tar.bz2
plan9port-f002cc17a63794af58bfde55a95b7c7fd6551d9a.zip
print out signalled exits
Diffstat (limited to 'src/cmd/rc')
-rw-r--r--src/cmd/rc/plan9ish.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/rc/plan9ish.c b/src/cmd/rc/plan9ish.c
index bd9698c8..c11bf9bb 100644
--- a/src/cmd/rc/plan9ish.c
+++ b/src/cmd/rc/plan9ish.c
@@ -139,6 +139,7 @@ void execfinit(void){
envp=environp;
start(rdfns, 1, runq->local);
}
+extern int mapfd(int);
int Waitfor(int pid, int unused0){
thread *p;
Waitmsg *w;
@@ -146,10 +147,14 @@ int Waitfor(int pid, int unused0){
while((w = wait()) != nil){
if(w->pid==pid){
+ if(strncmp(w->msg, "signal: ", 8) == 0)
+ fprint(mapfd(2), "%d: %s\n", w->pid, w->msg);
setstatus(w->msg);
free(w);
return 0;
}
+ if(strncmp(w->msg, "signal: ", 8) == 0)
+ fprint(2, "%d: %s\n", w->pid, w->msg);
for(p=runq->ret;p;p=p->ret)
if(p->pid==w->pid){
p->pid=-1;