mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
hurd: initialize libpthread before starting the signal thread
We cannot rely on csu calling __pthread_initialize_minimal before posixland_init, in some cases _init gets called before that.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <unistd.h>
|
||||
#include <hurd.h>
|
||||
#include <hurd/port.h>
|
||||
#include <ldsodefs.h>
|
||||
#include "set-hooks.h"
|
||||
#include "hurdmalloc.h" /* XXX */
|
||||
|
||||
@@ -116,6 +117,11 @@ _hurd_libc_proc_init (char **argv)
|
||||
{
|
||||
if (_hurd_portarray)
|
||||
{
|
||||
/* We will start the signal thread, so we need to initialize libpthread
|
||||
* if linked in. */
|
||||
if (__pthread_initialize_minimal != NULL)
|
||||
__pthread_initialize_minimal ();
|
||||
|
||||
/* Tell the proc server we exist, if it does. */
|
||||
if (_hurd_portarray[INIT_PORT_PROC] != MACH_PORT_NULL)
|
||||
_hurd_new_proc_init (argv, _hurd_intarray, _hurd_intarraysize);
|
||||
|
||||
Reference in New Issue
Block a user