diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-01 07:41:06 +0100 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-01 07:41:06 +0100 |
| commit | 0e242236bada9266fb4d71912edad87c099ba96f (patch) | |
| tree | d429a0aa536afc664556987d7606cb94fea44d1c | |
| parent | 02d22e158d8deb898801e5221f84885cd99fbfed (diff) | |
| parent | 1a02a458839fd85ff58856a666918db1d111adec (diff) | |
| download | plan9front-0e242236bada9266fb4d71912edad87c099ba96f.tar.xz | |
merge
| -rw-r--r-- | sys/src/9/port/pgrp.c | 2 | ||||
| -rw-r--r-- | sys/src/9/port/proc.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/src/9/port/pgrp.c b/sys/src/9/port/pgrp.c index fb23b432c..069df11da 100644 --- a/sys/src/9/port/pgrp.c +++ b/sys/src/9/port/pgrp.c @@ -29,7 +29,7 @@ pgrpnote(ulong noteid, char *a, long n, int flag) continue; if(up != p && p->noteid == noteid && p->kp == 0) { qlock(&p->debug); - if(p->pid != 0 && p->noteid == noteid) + if(p->noteid == noteid) postnote(p, 0, buf, flag); qunlock(&p->debug); } diff --git a/sys/src/9/port/proc.c b/sys/src/9/port/proc.c index 41cfb9aff..911bfd608 100644 --- a/sys/src/9/port/proc.c +++ b/sys/src/9/port/proc.c @@ -903,9 +903,18 @@ postnote(Proc *p, int dolock, char *n, int flag) int s, ret; QLock *q; + if(p == nil) + return 0; + if(dolock) qlock(&p->debug); + if(p->pid == 0){ + if(dolock) + qunlock(&p->debug); + return 0; + } + if(n != nil && flag != NUser && (p->notify == 0 || p->notified)) p->nnote = 0; |
