summaryrefslogtreecommitdiff
path: root/trans/crash.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-01 20:21:03 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-01 20:21:03 +0000
commitc3620bbd761143a5b2fab3ab33361fcba71fbe0f (patch)
tree4842e333bdaa8875c14e79f7b0d3cde3cb8016fe /trans/crash.c
parent7c49d500468c20bf82d4299c7ec8e413cd12a71a (diff)
(S_crash_dump_task): New args EXC, CODE, SUBCODE, CTTY_ID. Supply
SIGCODE arg to proc_mark_stop. (signal_crasher): New arg SIGCODE, supply to proc_mark_exit. All callers changed. (S_msg_sig_post_untraced): Supply C->sigcode to proc_mark_stop.
Diffstat (limited to 'trans/crash.c')
-rw-r--r--trans/crash.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/trans/crash.c b/trans/crash.c
index eec85b54..a696a9d2 100644
--- a/trans/crash.c
+++ b/trans/crash.c
@@ -82,7 +82,9 @@ kern_return_t
S_crash_dump_task (mach_port_t port,
mach_port_t reply_port, mach_msg_type_name_t reply_type,
task_t task, file_t core_file, char *target,
- int signo, int sigcode, int sigerror)
+ int signo, int sigcode, int sigerror,
+ natural_t exc, natural_t code, natural_t subcode,
+ mach_port_t ctty_id)
{
error_t err;
@@ -122,7 +124,7 @@ S_crash_dump_task (mach_port_t port,
c->proc = user_proc;
/* Tell the proc server the crasher stopped. */
- proc_mark_stop (user_proc, signo);
+ proc_mark_stop (user_proc, signo, sigcode);
c->task = task;
c->core_file = core_file;
@@ -147,7 +149,7 @@ S_crash_dump_task (mach_port_t port,
/* Handle an attempt to send a signal to crashing task C. */
static error_t
-signal_crasher (struct crasher *c, int signo, mach_port_t refport)
+signal_crasher (struct crasher *c, int signo, int sigcode, mach_port_t refport)
{
error_t err;
@@ -159,7 +161,7 @@ signal_crasher (struct crasher *c, int signo, mach_port_t refport)
case SIGTERM:
case SIGKILL:
/* Kill it as asked. */
- proc_mark_exit (c->proc, W_EXITCODE (0, signo));
+ proc_mark_exit (c->proc, W_EXITCODE (0, signo), sigcode);
err = task_terminate (c->task);
break;
@@ -205,7 +207,7 @@ S_msg_sig_post (mach_port_t port,
if (! c)
return EOPNOTSUPP;
- return signal_crasher (c, signo, refport);
+ return signal_crasher (c, signo, sigcode, refport);
}
kern_return_t
@@ -221,7 +223,7 @@ S_msg_sig_post_untraced (mach_port_t port,
return EOPNOTSUPP;
if (signo != 0 && signo != c->signo)
- return signal_crasher (c, signo, refport);
+ return signal_crasher (c, signo, sigcode, refport);
if (refport != c->task)
err = EPERM;
@@ -241,7 +243,7 @@ S_msg_sig_post_untraced (mach_port_t port,
/* Tell the proc server it has stopped (again)
with the original crash signal. */
- proc_mark_stop (c->proc, c->signo);
+ proc_mark_stop (c->proc, c->signo, c->sigcode);
/* We don't need to listen on this msgport any more. */
ports_destroy_right (c);