-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use waitpid to iterate over all exited child processes #122
Merged
+487
−403
Commits on Aug 23, 2019
-
Configuration menu - View commit details
-
Copy full SHA for e1c6d99 - Browse repository at this point
Copy the full SHA e1c6d99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 507fb5a - Browse repository at this point
Copy the full SHA 507fb5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for de199d3 - Browse repository at this point
Copy the full SHA de199d3View commit details -
Return an invalid wait ID for processes.wait() if the process has alr…
…eady exited. Avoids overlap with valid wait IDs, so that a paired cancelWait() doesn't cancel a different wait.
Configuration menu - View commit details
-
Copy full SHA for 72234fc - Browse repository at this point
Copy the full SHA 72234fcView commit details -
Avoid interference with other users of waitpid.
Instead of using waitpid(-1), explicitly waits on all known processes. This is inefficient for large numbers of child processes, but seems to be the only way to ensure to not interfere with other code that uses waitpid().
Configuration menu - View commit details
-
Copy full SHA for 4724f14 - Browse repository at this point
Copy the full SHA 4724f14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ef320c - Browse repository at this point
Copy the full SHA 1ef320cView commit details -
Rework the child process exit code to not rely in SIGCHLD.
It turns out that in a heterogeneous process where other parts of the code may start processes or threads and may be waiting for those to finish, it is not realistic to rely on signalfd or even SIGCHLD in general to get notified about child process exits. The only solid way appears to be to start a separate waiter thread that uses waitid/waitpid to wait for exited child processes in a blocking way. This also fixes the hanging vibe.core.process test in vibe-core with DMD 2.087.x.
Configuration menu - View commit details
-
Copy full SHA for 7ebad49 - Browse repository at this point
Copy the full SHA 7ebad49View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1c2eb7 - Browse repository at this point
Copy the full SHA f1c2eb7View commit details -
Integrates the contents of StaticProcesses into PosixEventDriverProcesses to fully hide it form the Windows build. It also changes lockedProcessInfo to be a non-template function, as that lead to a linker error on macOS.
Configuration menu - View commit details
-
Copy full SHA for 01c2c26 - Browse repository at this point
Copy the full SHA 01c2c26View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c3afcc - Browse repository at this point
Copy the full SHA 5c3afccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20373d1 - Browse repository at this point
Copy the full SHA 20373d1View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.