Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/main/main.c')
-rw-r--r--agent/tcf/main/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/agent/tcf/main/main.c b/agent/tcf/main/main.c
index ec363f75..b2c83f83 100644
--- a/agent/tcf/main/main.c
+++ b/agent/tcf/main/main.c
@@ -117,7 +117,7 @@ static BOOL CtrlHandler(DWORD ctrl) {
static const char * help_text[] = {
"Usage: agent [OPTION]...",
"Start Target Communication Framework agent.",
- " -d run in daemon mode",
+ " -d run in daemon mode (output is sent to system logger)",
#if ENABLE_Cmdline
" -i run in interactive mode",
#endif
@@ -274,6 +274,12 @@ int main(int argc, char ** argv) {
}
}
+ if (daemon && strcmp (log_name, LOG_NAME_STDERR) != 0 && log_name != NULL) {
+ fprintf(stderr, "%s: error: can only log to stderr when in daemon "
+ "mode.\n", progname);
+ exit (1);
+ }
+
if (daemon) become_daemon();
open_log_file(log_name);

Back to the top