mirror of
https://github.com/troglobit/finit.git
synced 2026-10-16 10:39:35 +00:00
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:
1 parent
8198582c10
commit
e1bb5e3396
2 files changed
+11
-1
No files matched your search
+4
-1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user