From: Josef 'Jeff' Sipek Date: Mon, 20 Aug 2018 22:07:30 +0000 (-0400) Subject: master: Wait 1 second for SIGQUITs to get handled X-Git-Tag: 2.3.9~1547 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09c856b4d82d2b77fa6575b6d7ec229b53091187;p=thirdparty%2Fdovecot%2Fcore.git master: Wait 1 second for SIGQUITs to get handled The delay (previously 100ms, now 1s) is intended to delay our exit enough so that the child processes have a chance to receive & handle the SIGQUITs we just sent. If we don't wait long enough, it is possible that we'll get restarted before our children had the chance to stop listening on their sockets and we'll hit "address already in use" type errors. Increasing the delay does not fix the issue, but it masks it better. --- diff --git a/src/master/service-monitor.c b/src/master/service-monitor.c index 7f1f2451a3..a1d9795dbf 100644 --- a/src/master/service-monitor.c +++ b/src/master/service-monitor.c @@ -631,7 +631,7 @@ static void services_monitor_wait_and_kill(struct service_list *service_list) if (service_list_processes_close_listeners(service_list)) { /* SIGQUITs were sent. wait a little bit to make sure they're also processed before quitting. */ - usleep(100000); + usleep(1000000); } }