kern: fix very old bug in syscall tracing
This commit is contained in:
parent
7ae04d282f
commit
8ea71b1c66
|
@ -323,13 +323,15 @@ syscall(Syscalls scallnr, Ureg* ureg)
|
||||||
}
|
}
|
||||||
if(up->syscallq != nil){
|
if(up->syscallq != nil){
|
||||||
qlock(&up->debug);
|
qlock(&up->debug);
|
||||||
if(up->syscallq != nil){
|
if(up->syscallq != nil
|
||||||
|
&& !waserror()){
|
||||||
notedefer();
|
notedefer();
|
||||||
if(!waserror()){
|
if(!waserror()){
|
||||||
qwrite(up->syscallq, str, jehanne_strlen(str));
|
qwrite(up->syscallq, str, jehanne_strlen(str));
|
||||||
poperror();
|
poperror();
|
||||||
}
|
}
|
||||||
noteallow();
|
noteallow();
|
||||||
|
poperror();
|
||||||
}
|
}
|
||||||
qunlock(&up->debug);
|
qunlock(&up->debug);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ growfd(Fgrp *f, int fd) /* fd is always >= 0 */
|
||||||
* Unbounded allocation is unwise
|
* Unbounded allocation is unwise
|
||||||
*/
|
*/
|
||||||
if(f->nfd >= 5000){
|
if(f->nfd >= 5000){
|
||||||
Exhausted:
|
Exhausted:
|
||||||
jehanne_print("no free file descriptors\n");
|
jehanne_print("no free file descriptors\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue