Merge pull request #99 from westermo/usr/wkz/inetd-timer-crash

Do not try to SIGKILL inetd services, they are not backed by a pid
This commit is contained in:
Joachim Nilsson authored and GitHub committed 2018-02-09 14:44:17 +01:00
commit 0a643953c0
1 file changed
+2 -1
+2 -1
View File
@@ -966,7 +966,8 @@ static void svc_set_state(svc_t *svc, svc_state_t new)
*state = new;
/* if the PID isn't collected within 3s, kill it! */
if (*state == SVC_STOPPING_STATE) {
if ((*state == SVC_STOPPING_STATE) &&
!svc_is_inetd(svc)) {
service_timeout_cancel(svc);
service_timeout_after(svc, 3000, service_kill);
}