aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-17 10:36:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-17 10:36:07 +0100
commit3e23c6b1128023a94a440b118eabf8df5b33090f (patch)
tree300824b9de818e5f4ddbcb64d1bb8b0d73a1a567 /src/rspamd.c
parent609d4f862202c43241fdab06b0795db6281ca3f7 (diff)
downloadrspamd-3e23c6b1128023a94a440b118eabf8df5b33090f.tar.gz
rspamd-3e23c6b1128023a94a440b118eabf8df5b33090f.zip
[Feature] Improve subprocesses termination handle
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index 01377e7cf..1b24fd67a 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -730,10 +730,22 @@ wait_for_workers (gpointer key, gpointer value, gpointer unused)
}
}
}
+ else if (nowait) {
+ kill (w->pid, 0);
+
+ if (errno != ESRCH) {
+ return FALSE;
+ }
+ else {
+ goto finished;
+ }
+ }
return FALSE;
}
+
+
finished:
msg_info_main ("%s process %P terminated %s",
g_quark_to_string (w->type), w->pid,