We now buffer stdout and stderr to a file and flush that when running in parallel. RC_PARALLEL_STARTUP has been renamed to RC_PARALLEL.

This commit is contained in:
Roy Marples
2007-04-24 11:29:19 +00:00
parent c965f74f46
commit a44abb9577
8 changed files with 158 additions and 239 deletions

View File

@ -644,6 +644,20 @@ char **rc_config_env (char **env)
} else
env = rc_strlist_add (env, "RC_DEFAULTLEVEL=" RC_LEVEL_DEFAULT);
/* Store the name of the tty that stdout is connected to
* We do this so our init scripts can call eflush without any knowledge
* of our fd's */
if (isatty (fileno (stdout))) {
if ((p = rc_xstrdup (ttyname (fileno (stdout))))) {
i = strlen ("RC_TTY=") + strlen (p) + 1;
line = rc_xmalloc (sizeof (char *) * i);
snprintf (line, i, "RC_TTY=%s", p);
env = rc_strlist_add (env, line);
free (p);
free (line);
}
}
memset (sys, 0, sizeof (sys));
/* Linux can run some funky stuff like Xen, VServer, UML, etc