summaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-02-01 13:20:19 +0000
committerRoy Marples <roy@marples.name>2008-02-01 13:20:19 +0000
commitf2ce40d90b92f6049745f6f06191bd43b6b931dd (patch)
treebc64ec292bbe407b420f6795ce1da7cc4e01c08a /src/rc/runscript.c
parent01e148d29d643af342a67bfa2f70928d6a6e0b75 (diff)
downloadopenrc-f2ce40d90b92f6049745f6f06191bd43b6b931dd.tar.gz
openrc-f2ce40d90b92f6049745f6f06191bd43b6b931dd.tar.bz2
openrc-f2ce40d90b92f6049745f6f06191bd43b6b931dd.tar.xz
Use sigaction over signal.
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index c52ae15..458ecd2 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -490,7 +490,8 @@ static bool svc_exec (const char *arg1, const char *arg2)
signal_pipe[0] = signal_pipe[1] = -1;
if (master_tty >= 0) {
- signal (SIGWINCH, SIG_IGN);
+ /* Why did we do this? */
+ /* signal (SIGWINCH, SIG_IGN); */
close (master_tty);
master_tty = -1;
}
@@ -1199,11 +1200,11 @@ int runscript (int argc, char **argv)
}
/* Setup a signal handler */
- signal (SIGHUP, handle_signal);
- signal (SIGINT, handle_signal);
- signal (SIGQUIT, handle_signal);
- signal (SIGTERM, handle_signal);
- signal (SIGCHLD, handle_signal);
+ signal_setup (SIGHUP, handle_signal);
+ signal_setup (SIGINT, handle_signal);
+ signal_setup (SIGQUIT, handle_signal);
+ signal_setup (SIGTERM, handle_signal);
+ signal_setup (SIGCHLD, handle_signal);
/* Load our plugins */
rc_plugin_load ();