From 4fe53b3aba281d102c3119f34780e5479dd4fe51 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Sep 1999 00:08:27 +0000 Subject: Update. 1999-09-04 Ulrich Drepper * sysdeps/unix/sysv/linux/getaddrinfo.c: Little optimization. 1999-09-03 Andreas Schwab * sysdeps/unix/sysv/linux/syscalls.list: Rename strong name for fork from __syscall_fork to __libc_fork. * posix/Versions: Add __libc_fork and __vfork to version GLIBC_2.1.2. --- linuxthreads/ptfork.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'linuxthreads/ptfork.c') diff --git a/linuxthreads/ptfork.c b/linuxthreads/ptfork.c index 2245407224..1dfa8b6ab7 100644 --- a/linuxthreads/ptfork.c +++ b/linuxthreads/ptfork.c @@ -73,11 +73,11 @@ static inline void pthread_call_handlers(struct handler_list * list) for (/*nothing*/; list != NULL; list = list->next) (list->handler)(); } -extern int __fork(void); +extern int __libc_fork(void); -int fork(void) +pid_t __fork(void) { - int pid; + pid_t pid; struct handler_list * prepare, * child, * parent; pthread_mutex_lock(&pthread_atfork_lock); @@ -86,7 +86,7 @@ int fork(void) parent = pthread_atfork_parent; pthread_mutex_unlock(&pthread_atfork_lock); pthread_call_handlers(prepare); - pid = __fork(); + pid = __libc_fork(); if (pid == 0) { __pthread_reset_main_thread(); __fresetlockfiles(); @@ -96,3 +96,11 @@ int fork(void) } return pid; } + +weak_alias (__fork, fork); + +pid_t __vfork(void) +{ + return __fork(); +} +weak_alias (__vfork, vfork); -- cgit v1.2.3