9
0
Fork 0

Do not exceed 80 characters per line

Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
This commit is contained in:
Emmanuel Bretelle 2010-09-07 20:04:46 +02:00 committed by Harald Welte
parent eaaf50095b
commit 91384a4cb0
1 changed files with 6 additions and 3 deletions

View File

@ -437,15 +437,18 @@ int main(int argc, char **argv)
/* Is this really needed ? */
f = freopen("/dev/null", "w", stdout);
if (f == NULL) {
sys_err(LOG_WARNING, __FILE__, __LINE__, 0, "Could not redirect stdout to /dev/null");
sys_err(LOG_WARNING, __FILE__, __LINE__, 0,
"Could not redirect stdout to /dev/null");
}
f = freopen("/dev/null", "w", stderr);
if (f == NULL) {
sys_err(LOG_WARNING, __FILE__, __LINE__, 0, "Could not redirect stderr to /dev/null");
sys_err(LOG_WARNING, __FILE__, __LINE__, 0,
"Could not redirect stderr to /dev/null");
}
f = freopen("/dev/null", "r", stdin);
if (f == NULL) {
sys_err(LOG_WARNING, __FILE__, __LINE__, 0, "Could not redirect stdin to /dev/null");
sys_err(LOG_WARNING, __FILE__, __LINE__, 0,
"Could not redirect stdin to /dev/null");
}
rc = daemon(0, 0);
if (rc != 0) {