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 "signal_user.h"
21 #include "time_user.h"
24 #include "choose-mode.h"
25 #include "kern_util.h"
26 #include "user_util.h"
29 void kill_child_dead(int pid
)
35 CATCH_EINTR(n
= waitpid(pid
, NULL
, 0));
43 void segv_handler(int sig
, union uml_pt_regs
*regs
)
45 struct faultinfo
* fi
= UPT_FAULTINFO(regs
);
47 if(UPT_IS_USER(regs
) && !SEGV_IS_FIXABLE(fi
)){
48 bad_segv(*fi
, UPT_IP(regs
));
51 segv(*fi
, UPT_IP(regs
), UPT_IS_USER(regs
), regs
);
54 void usr2_handler(int sig
, union uml_pt_regs
*regs
)
56 CHOOSE_MODE(syscall_handler_tt(sig
, regs
), (void) 0);
59 struct signal_info sig_info
[] = {
60 [ SIGTRAP
] { .handler
= relay_signal
,
62 [ SIGFPE
] { .handler
= relay_signal
,
64 [ SIGILL
] { .handler
= relay_signal
,
66 [ SIGWINCH
] { .handler
= winch
,
68 [ SIGBUS
] { .handler
= bus_handler
,
70 [ SIGSEGV
] { .handler
= segv_handler
,
72 [ SIGIO
] { .handler
= sigio_handler
,
74 [ SIGVTALRM
] { .handler
= timer_handler
,
76 [ SIGALRM
] { .handler
= timer_handler
,
78 [ SIGUSR2
] { .handler
= usr2_handler
,
82 void do_longjmp(void *b
, int val
)
86 siglongjmp(*buf
, val
);
90 * Overrides for Emacs so that we follow Linus's tabbing style.
91 * Emacs will notice this stuff at the end of the file and automatically
92 * adjust the settings for this buffer only. This must remain at the end
94 * ---------------------------------------------------------------------------
96 * c-file-style: "linux"