diff options
author | Mikhail Gusarov <dottedmag@debian.org> | 2015-03-07 10:15:16 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-08 22:42:50 +0000 |
commit | ac69ad95af2dd73db0ac6a21fdf4bc386034b576 (patch) | |
tree | b0d37dc7dea81712e90b30bbb77aece2fbb1cfdc /src/main.c | |
parent | ed492b2b9f25474c7faa3fffbc9abe0328733278 (diff) | |
download | rspamd-ac69ad95af2dd73db0ac6a21fdf4bc386034b576.tar.gz rspamd-ac69ad95af2dd73db0ac6a21fdf4bc386034b576.zip |
Do not fail if pid file is not specified in config
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 10b1c905f..0f2ceb360 100644 --- a/src/main.c +++ b/src/main.c @@ -1335,7 +1335,9 @@ main (gint argc, gchar **argv, gchar **env) rspamd_signals_init (&signals, sig_handler); - if (rspamd_write_pid (rspamd_main) == -1) { + if (rspamd_main->cfg->pid_file == NULL) { + msg_info("pid file is not specified, skipping writing it"); + } else if (rspamd_write_pid (rspamd_main) == -1) { msg_err ("cannot write pid file %s", rspamd_main->cfg->pid_file); exit (-errno); } |