summaryrefslogtreecommitdiff
path: root/hurd/hurdsig.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/hurdsig.c
parentf58f41f1f479e299a8e61235934befc014992609 (diff)
downloadglibc-7595ddb8f97e4262b38e6e2a3c211204581171cc.tar.gz
* 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/hurdsig.c')
-rw-r--r--hurd/hurdsig.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 748d8406c1..34b28d94da 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -1030,7 +1030,6 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
msg.msgh_local_port = MACH_PORT_NULL;
/* These values do not matter. */
msg.msgh_id = 8675309; /* Jenny, Jenny. */
- msg.msgh_seqno = 17; /* Random. */
ss->suspended = MACH_PORT_NULL;
err = __mach_msg (&msg, MACH_SEND_MSG, sizeof msg, 0,
MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
@@ -1300,8 +1299,19 @@ _hurdsig_init (const int *intarray, size_t intarraysize)
}
/* Receive exceptions on the signal port. */
+#ifdef TASK_EXCEPTION_PORT
__task_set_special_port (__mach_task_self (),
TASK_EXCEPTION_PORT, _hurd_msgport);
+#elif defined (EXC_MASK_ALL)
+ __task_set_exception_ports (__mach_task_self (),
+ EXC_MASK_ALL & ~(EXC_MASK_SYSCALL
+ | EXC_MASK_MACH_SYSCALL
+ | EXC_MASK_RPC_ALERT),
+ _hurd_msgport,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+#else
+# error task_set_exception_port?
+#endif
/* Sanity check. Any pending, unblocked signals should have been
taken by our predecessor incarnation (i.e. parent or pre-exec state)