]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Added an assert to catch duplicate fork() PIDs.
authorTimo Sirainen <tss@iki.fi>
Mon, 27 Oct 2014 18:10:19 +0000 (20:10 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 27 Oct 2014 18:10:19 +0000 (20:10 +0200)
This really shouldn't be happening, but apparently it does sometimes. This
should make it easier to debug.

src/master/service-process.c

index bc10df1dcc822b6bb7c98da793707a03c97f9c15..6dc947b0b03a4fc7d643b9934d2ffb25bf18c03e 100644 (file)
@@ -334,6 +334,7 @@ struct service_process *service_process_create(struct service *service)
                drop_privileges(service);
                process_exec(service->executable, NULL);
        }
+       i_assert(hash_table_lookup(service_pids, POINTER_CAST(pid)) == NULL);
 
        process = i_new(struct service_process, 1);
        process->service = service;