From e9417fffb39c299e556c5ad0c1545f0c02618e3c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 18 Feb 2011 19:52:42 -0500 Subject: 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. --- include/pthread.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/pthread.h b/include/pthread.h index 749a0e8c..19199468 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -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 int __setjmp(void *); -- cgit v1.2.1