mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
(__fork): Renamed from fork and use __libc_fork. Add fork as weak alias.
(__vfork): New function, alias vfork.
This commit is contained in:
parent
d08aaae1b2
commit
355e5a9698
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user