summaryrefslogtreecommitdiff
path: root/startup/startup.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-09-18 22:58:11 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-11-21 05:49:03 +0100
commit5cf9e79ca7a28376c7645271136eb2cbb30dc5bc (patch)
treeee7c9ebf39e9853a1dcc3268bdffbdf8f7c1dd0f /startup/startup.c
parent7e9c559c75901f391b4151ed6cabba74e60f80af (diff)
startup: do not pass signals on to the child
Formerly /hurd/startup would forward all signals to the child it started (e.g. /libexec/runsystem). The motivation for doing so is not revealed in the comments, nor it is mentioned in the history of the version control system. This patch removes the forwarding of signals to the child. * startup/startup.c (process_signal): Do not pass signals on to the child. * startup/stubs.c: Remove file. * startup/Makefile: Remove stubs.c.
Diffstat (limited to 'startup/startup.c')
-rw-r--r--startup/startup.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/startup/startup.c b/startup/startup.c
index 29269a6d..4c91d4cf 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -904,9 +904,6 @@ frob_kernel_process (void)
static pid_t child_pid; /* PID of the child we run */
static task_t child_task; /* and its (original) task port */
-error_t send_signal (mach_port_t msgport, int signal, mach_port_t refport,
- mach_msg_timeout_t);
-
static void launch_something (const char *why);
@@ -965,52 +962,6 @@ process_signal (int signo)
}
}
}
- else
- {
- /* Pass the signal on to the child. */
- task_t task;
- error_t err;
-
- err = proc_pid2task (procserver, child_pid, &task);
- if (err)
- {
- error (0, err, "proc_pid2task on %d", child_pid);
- task = child_task;
- }
- else
- {
- mach_port_deallocate (mach_task_self (), child_task);
- child_task = task;
- }
-
- if (signo == SIGKILL)
- {
- err = task_terminate (task);
- if (err != MACH_SEND_INVALID_DEST)
- error (0, err, "task_terminate");
- }
- else
- {
- mach_port_t msgport;
- err = proc_getmsgport (procserver, child_pid, &msgport);
- if (err)
- error (0, err, "proc_getmsgport");
- else
- {
- err = send_signal (msgport, signo, task,
- 500); /* Block only half a second. */
- mach_port_deallocate (mach_task_self (), msgport);
- if (err)
- {
- error (0, err, "cannot send %s to child %d",
- strsignal (signo), child_pid);
- err = task_terminate (task);
- if (err != MACH_SEND_INVALID_DEST)
- error (0, err, "task_terminate");
- }
- }
- }
- }
}
/* Start the child program PROG. It is run via /libexec/console-run