mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
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 (;;) {
|
||||
int const pid = lx_pollpid();
|
||||
|
||||
if (pid == -1)
|
||||
if (pid <= 0)
|
||||
break;
|
||||
|
||||
Platform_thread::submit_exception(pid);
|
||||
|
Loading…
Reference in New Issue
Block a user