kern: keep reading /proc/n/syscall after process death, to get all messages

This commit is contained in:
Giacomo Tesio 2017-11-21 00:29:31 +01:00
parent 9aea97a51f
commit 2b62ed8010
1 changed files with 6 additions and 0 deletions

View File

@ -826,6 +826,12 @@ procread(Chan *c, void *va, long n, int64_t off)
}
return rptr - (uint8_t*)va;
}
if(QID(c->qid) == Qsyscall && qcanread(c->aux)){
/* whatever the process status, the reader can read
* pending syscall records
*/
return qread(c->aux, va, n);
}
if((p = psincref(SLOT(c->qid))) == nil)
error(Eprocdied);