aboutsummaryrefslogtreecommitdiff
path: root/src/rc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-25 12:30:24 +0000
committerRoy Marples <roy@marples.name>2007-04-25 12:30:24 +0000
commitdfc208bd25288dd09d531f3e0665274bb9cf2998 (patch)
treee3253e1b287969e4abf72441894b53f17bbdc49e /src/rc.c
parentae32cbdd4b863fbe707981f85c19e04b1faecf6c (diff)
We now have an alternative to buffering stdout and stderr.
RC_PREFIX="yes" will put the service name as a prefix to all output made by the service. Thanks to Ciaran McCreesh for the idea.
Diffstat (limited to 'src/rc.c')
-rw-r--r--src/rc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc.c b/src/rc.c
index c533a18b..3b9eaf1a 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -388,14 +388,15 @@ static void sulogin (bool cont)
}
#endif
+ newenv = rc_filter_env ();
+
if (cont) {
int status = 0;
- pid_t pid = vfork();
+ pid_t pid = vfork ();
if (pid == -1)
eerrorx ("%s: vfork: %s", applet, strerror (errno));
if (pid == 0) {
- newenv = rc_filter_env ();
#ifdef __linux__
execle ("/sbin/sulogin", "/sbin/sulogin",
getenv ("CONSOLE"), (char *) NULL, newenv);
@@ -411,7 +412,6 @@ static void sulogin (bool cont)
waitpid (pid, &status, 0);
} else {
#ifdef __linux
- newenv = rc_filter_env ();
execle ("/sbin/sulogin", "/sbin/sulogin",
getenv ("CONSOLE"), (char *) NULL, newenv);
eerrorx ("%s: unable to exec `/sbin/sulogin': %s", applet, strerror (errno));
@@ -542,7 +542,7 @@ static void handle_signal (int sig)
kill (pl->pid, SIGTERM);
/* Notify plugins we are aborting */
- rc_plugin_run (rc_hook_abort, "rc");
+ rc_plugin_run (rc_hook_abort, NULL);
/* Only drop into single user mode if we're booting */
run = getenv ("RUNLEVEL");