From: Eric Leblond Date: Sun, 11 Nov 2012 17:47:07 +0000 (+0100) Subject: suricata: don't exit if pidfile can't be created X-Git-Tag: suricata-1.4beta3~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f4da93a4b501cd4d80e68be7f98c1707551d16d;p=thirdparty%2Fsuricata.git suricata: don't exit if pidfile can't be created --- diff --git a/src/suricata.c b/src/suricata.c index 1e5e2af97e..b5e7e73866 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -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) {