From: Ulrich Drepper Date: Sun, 5 Sep 1999 00:11:40 +0000 (+0000) Subject: (__fork): Renamed from fork and use __libc_fork. Add fork as weak alias. X-Git-Tag: cvs/glibc_2-1-2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=355e5a969850675d317b5c1dccbe8b7bbf223b31;p=thirdparty%2Fglibc.git (__fork): Renamed from fork and use __libc_fork. Add fork as weak alias. (__vfork): New function, alias vfork. --- diff --git a/linuxthreads/ptfork.c b/linuxthreads/ptfork.c index 2245407224c..977b0e2581f 100644 --- a/linuxthreads/ptfork.c +++ b/linuxthreads/ptfork.c @@ -75,9 +75,9 @@ static inline void pthread_call_handlers(struct handler_list * list) extern int __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,10 @@ int fork(void) } return pid; } +weak_alias (__fork, fork); + +pid_t __vfork(void) +{ + return __fork(); +} +weak_alias (__vfork, vfork);