mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
+3
-4
@@ -990,11 +990,10 @@ 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) &&
|
||||
!svc_is_inetd(svc)) {
|
||||
/* if PID isn't collected within SVC_TERM_TIMEOUT msec, kill it! */
|
||||
if ((*state == SVC_STOPPING_STATE) && !svc_is_inetd(svc)) {
|
||||
service_timeout_cancel(svc);
|
||||
service_timeout_after(svc, 3000, service_kill);
|
||||
service_timeout_after(svc, SVC_TERM_TIMEOUT, service_kill);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ typedef enum {
|
||||
#define MAX_NUM_FDS 64 /* Max number of I/O plugins */
|
||||
#define MAX_NUM_SVC_ARGS 32
|
||||
|
||||
/* Time after SIGTERM that we SIGKILL stopping processes */
|
||||
#define SVC_TERM_TIMEOUT 3000
|
||||
|
||||
/*
|
||||
* Default enable for all services, can be stopped by means
|
||||
* of issuing an initctl call. E.g.
|
||||
|
||||
Reference in New Issue
Block a user