-
Incident report
-
Resolution: Won't fix
-
Trivial
-
None
-
2.2.2
-
Linux, i386
When the pid file cannot be created, zabbix_server terminates with exit-code 0 and without any meaningful error message. Following (untested) patch proposal might fix that:
— src/libs/zbxnix/daemon.c 2014-02-12 09:04:36.000000000 +0000
+++ src/libs/zbxnix/daemon-new.c 2014-05-16 22:13:19.719068545 +0000
@@ -203,8 +203,10 @@
redirect_std(CONFIG_LOG_FILE);
- if (FAIL == create_pid_file(CONFIG_PID_FILE))
+ if (FAIL == create_pid_file(CONFIG_PID_FILE)) { + zbx_error("Failed to create pid file %s, terminating", CONFIG_PID_FILE); exit(FAIL); + }
atexit(daemon_stop);
Note: the process uses exit(FAIL), but since we are after fork of main process, this exit code will not make it to the user. If this behaviour was not desired, a separate bug should be filed.