forked from WebAssembly/wasi-libc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change is an experiment to enable `pthread_atfork` support under the mistaken assumption that it may have been called during thread creation. I no longer believe it is, so this is not a good idea. Here's how the registered handlers are executed, though: + prepare handlers are called in the parent before the fork with `__fork_handler(-1)` + parent handlers are called after the fork with `__fork_handler(0)`; fork returns the PID to the parent, which is negated (`!ret`) + child handlers are called after the fork with `__fork_handler(1)`; fork returns 0 to the child, which is negated (`!ret`)
- Loading branch information
Showing
3 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters