commit f002cc17a63794af58bfde55a95b7c7fd6551d9a
parent 39cff6e750c0ae587cbcb9ae771ed43fd6bbf362
Author: rsc <devnull@localhost>
Date: Sun, 17 Oct 2004 05:29:53 +0000
print out signalled exits
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git 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;