-/* Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <sys/stat.h>
#include <stdlib.h>
error_t
_hurd_ports_use (int which, error_t (*operate) (mach_port_t))
{
+ if (__glibc_unlikely (_hurd_ports == NULL))
+ /* This means that _hurd_init has not been called yet, which is
+ normally only the case in the bootstrap filesystem, and there
+ only in the early phases of booting. */
+ return EGRATUITOUS;
+
return HURD_PORT_USE (&_hurd_ports[which], (*operate) (port));
}
DEFINE_HOOK (_hurd_subinit, (void));
+__typeof (_hurd_proc_init) _hurd_new_proc_init; /* below */
+
/* Initialize the library data structures from the
ints and ports passed to us by the exec server.
/* Tell the proc server we exist, if it does. */
if (portarray[INIT_PORT_PROC] != MACH_PORT_NULL)
- _hurd_proc_init (argv, intarray, intarraysize);
+ _hurd_new_proc_init (argv, intarray, intarraysize);
/* All done with init ints and ports. */
__vm_deallocate (__mach_task_self (),
while. Eventually it probably makes most sense for the exec server to
mask out EXEC_SIGTRAP so the debugged program is closer to not being
able to tell it's being debugged. */
- if (_hurdsig_traced
+ if (!__sigisemptyset (&_hurdsig_traced)
#ifdef EXEC_SIGTRAP
&& !(_hurd_exec_flags & EXEC_SIGTRAP)
#endif