summaryrefslogtreecommitdiff
path: root/hurd/hurdfault.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-11-18 10:00:22 +0000
committerRoland McGrath <roland@gnu.org>1995-11-18 10:00:22 +0000
commita5a81fecc7194d050066265a15b1ba8bc3abc627 (patch)
treee4e3c1160fd41254b48678f71ece829b19dfb3dd /hurd/hurdfault.c
parent4cb202902d23b3c487016e516c70640c774b90d8 (diff)
Fri Nov 17 17:57:00 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>cvs/libc-951119cvs/libc-951118
* sysdeps/generic/Makefile (make_siglist): Add missing backslash. * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start_cleanup): New function. * hurd/hurdfault.c: Replace __libc_fatal calls with assert_perror. (_hurdsig_fault_init): Remove #if 0 from setting exception port. Insert send right for SIGEXC before thread_set_special_port. * hurd/hurdsig.c: Replace __libc_fatal calls with assert_perror. (_hurdsig_init): Remove #if 0 from setting exception port. * sysdeps/mach/hurd/ptrace.c (ptrace: PTRACE_CONT): Use HURD_MSGPORT_RPC macro.
Diffstat (limited to 'hurd/hurdfault.c')
-rw-r--r--hurd/hurdfault.c45
1 files changed, 24 insertions, 21 deletions
diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
index e8b54660b9..e1f8c19acc 100644
--- a/hurd/hurdfault.c
+++ b/hurd/hurdfault.c
@@ -1,5 +1,5 @@
/* Handle faults in the signal thread.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 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
@@ -114,30 +114,33 @@ _hurdsig_fault_init (void)
struct machine_thread_state state;
mach_port_t sigexc;
- if (err = __mach_port_allocate (__mach_task_self (),
- MACH_PORT_RIGHT_RECEIVE, &sigexc))
- __libc_fatal ("hurd: Can't create receive right for signal thread exc\n");
- if (err = __mach_port_allocate (__mach_task_self (),
- MACH_PORT_RIGHT_RECEIVE, &forward_sigexc))
- __libc_fatal ("hurd: Can't create receive right for signal thread exc\n");
+ err = __mach_port_allocate (__mach_task_self (),
+ MACH_PORT_RIGHT_RECEIVE, &sigexc);
+ assert_perror (err);
+ err = __mach_port_allocate (__mach_task_self (),
+ MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
+ assert_perror (err);
+
+ err = __mach_port_insert_right (__mach_task_self (),
+ sigexc, MACH_MSG_TYPE_MAKE_SEND);
+ assert_perror (err);
+ err = __thread_set_special_port (_hurd_msgport_thread,
+ THREAD_EXCEPTION_PORT, sigexc);
+ __mach_port_deallocate (__mach_task_self (), sigexc);
+ assert_perror (err);
memset (&state, 0, sizeof state);
MACHINE_THREAD_STATE_SET_PC (&state, faulted);
MACHINE_THREAD_STATE_SET_SP (&state, faultstack, sizeof faultstack);
-#if 0 /* Don't confuse gdb. */
- __thread_set_special_port (_hurd_msgport_thread,
- THREAD_EXCEPTION_PORT, sigexc);
-#endif
-
- if (err = __USEPORT
- (PROC,
- __proc_handle_exceptions (port,
- sigexc,
- forward_sigexc, MACH_MSG_TYPE_MAKE_SEND,
- MACHINE_THREAD_STATE_FLAVOR,
- (natural_t *) &state,
- MACHINE_THREAD_STATE_COUNT)))
- __libc_fatal ("hurd: proc won't handle signal thread exceptions\n");
+ err = __USEPORT
+ (PROC,
+ __proc_handle_exceptions (port,
+ sigexc,
+ forward_sigexc, MACH_MSG_TYPE_MAKE_SEND,
+ MACHINE_THREAD_STATE_FLAVOR,
+ (natural_t *) &state,
+ MACHINE_THREAD_STATE_COUNT));
+ assert_perror (err);
}