2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
13 #include <asm/unistd.h>
14 #include <asm/ptrace.h>
16 #include "sysdep/ptrace.h"
17 #include "sigcontext.h"
18 #include "sysdep/sigcontext.h"
20 #include "time_user.h"
23 #include "choose-mode.h"
24 #include "kern_util.h"
25 #include "user_util.h"
28 void kill_child_dead(int pid)
34 CATCH_EINTR(n = waitpid(pid, NULL, 0));
42 void segv_handler(int sig, union uml_pt_regs *regs)
44 struct faultinfo * fi = UPT_FAULTINFO(regs);
46 if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){
47 bad_segv(*fi, UPT_IP(regs));
50 segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs);
53 void usr2_handler(int sig, union uml_pt_regs *regs)
55 CHOOSE_MODE(syscall_handler_tt(sig, regs), (void) 0);
58 struct signal_info sig_info[] = {
59 [ SIGTRAP ] { .handler = relay_signal,
61 [ SIGFPE ] { .handler = relay_signal,
63 [ SIGILL ] { .handler = relay_signal,
65 [ SIGWINCH ] { .handler = winch,
67 [ SIGBUS ] { .handler = bus_handler,
69 [ SIGSEGV] { .handler = segv_handler,
71 [ SIGIO ] { .handler = sigio_handler,
73 [ SIGVTALRM ] { .handler = timer_handler,
75 [ SIGALRM ] { .handler = timer_handler,
77 [ SIGUSR2 ] { .handler = usr2_handler,
81 void do_longjmp(void *b, int val)
85 siglongjmp(*buf, val);
89 * Overrides for Emacs so that we follow Linus's tabbing style.
90 * Emacs will notice this stuff at the end of the file and automatically
91 * adjust the settings for this buffer only. This must remain at the end
93 * ---------------------------------------------------------------------------
95 * c-file-style: "linux"