add pthread_atfork interface
note that this presently does not handle consistency of the libc's own global state during forking. as per POSIX 2008, if the parent process was threaded, the child process may only call async-signal-safe functions until one of the exec-family functions is called, so the current behavior is believed to be conformant even if non-ideal. it may be improved at some later time.
This commit is contained in:
parent
446b4207cc
commit
e9417fffb3
4 changed files with 57 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ extern struct libc {
|
|||
volatile int threads_minus_1;
|
||||
int (*rsyscall)(int, long, long, long, long, long, long);
|
||||
void (**tsd_keys)(void *);
|
||||
void (*fork_handler)(int);
|
||||
} libc;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue