path: root/src/internal
diff options
authorRich Felker <>2011-02-18 19:52:42 -0500
committerRich Felker <>2011-02-18 19:52:42 -0500
commite9417fffb39c299e556c5ad0c1545f0c02618e3c (patch)
tree90c04bef0567ff4df7c7b57986a756b8b11b506c /src/internal
parent446b4207cc7a30d8a4d5b2445a5a1b27d440f55d (diff)
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.
Diffstat (limited to 'src/internal')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/libc.h b/src/internal/libc.h
index e353f363..ea221b6f 100644
--- a/src/internal/libc.h
+++ b/src/internal/libc.h
@@ -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;