Add --disable-redirect-output to configure script

This patch makes it possible to control the default redirection of
(misbehaving) services output to /dev/null.  With this disabled,
a service may write to its stdout/stderr and mess up the console.

By default all service/run/tasks stdout/stderr is redirected.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-28 20:22:06 +01:00
1 parent 8198582c10
commit e1bb5e3396
2 files changed
+11 -1

No files matched your search

+4 -1
View File
@@ -258,7 +258,9 @@ static int service_start(svc_t *svc)
dup2(fd, STDERR_FILENO);
close(fd);
}
} else {
}
#ifdef REDIRECT_OUTPUT
else {
FILE *fp;
fp = fopen("/dev/null", "w");
@@ -268,6 +270,7 @@ static int service_start(svc_t *svc)
fclose(fp);
}
}
#endif
logger_err:
sig_unblock();