Lind-Project / native_client

native_client trusted code base
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Waitpid Overhaul #130

Closed rennergade closed 2 years ago

rennergade commented 2 years ago

This refactors and fixes the entirety of waitpid. This started with fixing a backgrounding bug, but it revealed bugs elsewhere in waitpid when the pid is specified (it would formerly return if any cage had finished.

This refactors all of this to rely on the zombies list, which holds any cage that has exited. It also makes the mutex/CV scheme much more straightforward.