There is 1 second wait at shutdown for processes that are still running.
During this 1 second they should process SIGQUIT and close socket listeners.
However, it's normal behavior for the log process to still exist at this
stage, and there is no need to wait for it.
bool ret = FALSE;
array_foreach_elem(&service_list->services, service) {
- if (service_processes_close_listeners(service))
- ret = TRUE;
+ if (service_processes_close_listeners(service)) {
+ if (service->type != SERVICE_TYPE_LOG)
+ ret = TRUE;
+ else {
+ /* The log process won't stop until we close its
+ fds later on. Send a SIGQUIT to it anyway
+ just in case it's stuck for some reason, but
+ don't wait for it to be processed. This way
+ there is no unnecessary 1sec wait. */
+ }
+ }
}
return ret;
}