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
|
|
@ -162,6 +162,8 @@ int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *);
|
|||
int pthread_barrierattr_init(pthread_barrierattr_t *);
|
||||
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
|
||||
|
||||
int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
|
||||
|
||||
#include <bits/pthread.h>
|
||||
|
||||
int __setjmp(void *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue