print out signalled exits
This commit is contained in:
parent
39cff6e750
commit
f002cc17a6
1 changed files with 5 additions and 0 deletions
|
|
@ -139,6 +139,7 @@ void execfinit(void){
|
||||||
envp=environp;
|
envp=environp;
|
||||||
start(rdfns, 1, runq->local);
|
start(rdfns, 1, runq->local);
|
||||||
}
|
}
|
||||||
|
extern int mapfd(int);
|
||||||
int Waitfor(int pid, int unused0){
|
int Waitfor(int pid, int unused0){
|
||||||
thread *p;
|
thread *p;
|
||||||
Waitmsg *w;
|
Waitmsg *w;
|
||||||
|
|
@ -146,10 +147,14 @@ int Waitfor(int pid, int unused0){
|
||||||
|
|
||||||
while((w = wait()) != nil){
|
while((w = wait()) != nil){
|
||||||
if(w->pid==pid){
|
if(w->pid==pid){
|
||||||
|
if(strncmp(w->msg, "signal: ", 8) == 0)
|
||||||
|
fprint(mapfd(2), "%d: %s\n", w->pid, w->msg);
|
||||||
setstatus(w->msg);
|
setstatus(w->msg);
|
||||||
free(w);
|
free(w);
|
||||||
return 0;
|
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)
|
for(p=runq->ret;p;p=p->ret)
|
||||||
if(p->pid==w->pid){
|
if(p->pid==w->pid){
|
||||||
p->pid=-1;
|
p->pid=-1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue