From 9f4da93a4b501cd4d80e68be7f98c1707551d16d Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 11 Nov 2012 18:47:07 +0100 Subject: [PATCH] suricata: don't exit if pidfile can't be created --- src/suricata.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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) {