base-linux: Don't busywait if lx_pollpid returns 0
This happened when I killed one of the genode clients which was tracked via an expception_handler. In this case the wait4 syscall returned 0 and the for(;;) was looped eternally. This caused an 100% CPU utilization for the core binary.
This commit is contained in:
parent
257cf4800d
commit
ab89304ffd
|
@ -102,7 +102,7 @@ void Platform::wait_for_exit()
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int const pid = lx_pollpid();
|
int const pid = lx_pollpid();
|
||||||
|
|
||||||
if (pid == -1)
|
if (pid <= 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Platform_thread::submit_exception(pid);
|
Platform_thread::submit_exception(pid);
|
||||||
|
|
Loading…
Reference in New Issue