aboutsummaryrefslogtreecommitdiff
path: root/hurd/hurdinit.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-01-02 10:23:33 +0000
committerRoland McGrath <roland@gnu.org>2002-01-02 10:23:33 +0000
commit7595ddb8f97e4262b38e6e2a3c211204581171cc (patch)
tree6251a7cc722edc97d19aa7efe5e64eb91a0b4f3c /hurd/hurdinit.c
parentf58f41f1f479e299a8e61235934befc014992609 (diff)
downloadglibc-7595ddb8f97e4262b38e6e2a3c211204581171cc.tar
glibc-7595ddb8f97e4262b38e6e2a3c211204581171cc.tar.gz
glibc-7595ddb8f97e4262b38e6e2a3c211204581171cc.tar.bz2
glibc-7595ddb8f97e4262b38e6e2a3c211204581171cc.zip
* hurd/hurdinit.c (_hurd_ports_use): Return error _hurd_ports is null.
* hurd/hurdsig.c (_hurdsig_init): Conditionalize exception port setup for old CMU and new OSF Mach interface flavors. * hurd/hurdfault.c (_hurdsig_fault_init): Likewise. * sysdeps/mach/hurd/fork.c (__fork): Likewise. * hurd/hurdsig.c (_hurd_internal_post_signal): Leave msgh_seqno unset. * sysdeps/mach/hurd/spawni.c (__spawni) [KERN_INVALID_LEDGER]: Pass extra arguments to task_create for OSF variant. * sysdeps/mach/hurd/fork.c (__fork): Likewise.
Diffstat (limited to 'hurd/hurdinit.c')
-rw-r--r--hurd/hurdinit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hurd/hurdinit.c b/hurd/hurdinit.c
index dc5e904c5e..7a57031d62 100644
--- a/hurd/hurdinit.c
+++ b/hurd/hurdinit.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,94,95,96,97,98,99,2000,01
+ 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
@@ -39,6 +40,12 @@ int __libc_argc;
error_t
_hurd_ports_use (int which, error_t (*operate) (mach_port_t))
{
+ if (__builtin_expect (_hurd_ports == NULL, 0))
+ /* 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));
}