(__fork): Renamed from fork and use __libc_fork. Add fork as weak alias.

(__vfork): New function, alias vfork.
This commit is contained in:
Ulrich Drepper 1999-09-05 00:11:40 +00:00
parent d08aaae1b2
commit 355e5a9698

View File

@ -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);