suricata: don't exit if pidfile can't be created

pull/200/merge
Eric Leblond 13 years ago committed by Victor Julien
parent e148b2b82a
commit 9f4da93a4b

@ -1676,7 +1676,16 @@ int main(int argc, char **argv)
Daemonize();
if (SCPidfileCreate(pid_filename) != 0) {
pid_filename = NULL;
#if 1
SCLogError(SC_ERR_PIDFILE_DAEMON,
"Unable to create PID file, concurrent run of"
" Suricata can occur.");
SCLogError(SC_ERR_PIDFILE_DAEMON,
"PID file creation WILL be mandatory for daemon mode"
" in future version");
#else
exit(EXIT_FAILURE);
#endif
}
} else {
if (pid_filename != NULL) {

Loading…
Cancel
Save