Commit 3540a160 authored by Alessandro Rubini's avatar Alessandro Rubini

userspace: hal and rtud: don't close stdout/stderr

The stdout and stderr of the basic WR tools are piled to the "logger"
process, to get actual logs saved, if so configured for.

Thus, we should not reopen the output channels to /dev/null
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 84684e87
......@@ -170,11 +170,8 @@ static void hal_deamonize()
exit(EXIT_FAILURE);
}
/* Redirect standard files to /dev/null */
/* Redirect stdin to /dev/null -- keep output/error: they are logged */
freopen("/dev/null", "r", stdin);
freopen("/dev/null", "w", stdout);
freopen("/dev/null", "w", stderr);
}
static void show_help()
......
......@@ -70,11 +70,8 @@ void daemonize(void)
exit(EXIT_FAILURE);
}
/* Redirect standard files to /dev/null */
/* Redirect stdin to /dev/null -- keep output/error: they are logged */
freopen("/dev/null", "r", stdin);
freopen("/dev/null", "w", stdout);
freopen("/dev/null", "w", stderr);
}
void usage(char *name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment