mirror of
https://github.com/troglobit/finit.git
synced 2026-11-01 13:10:32 +00:00
1 parent
a40858f162
commit
4790344fbe
2 files changed
+6
-4
No files matched your search
+3
-4
@@ -990,11 +990,10 @@ static void svc_set_state(svc_t *svc, svc_state_t new)
|
|||||||
|
|
||||||
*state = new;
|
*state = new;
|
||||||
|
|
||||||
/* if the PID isn't collected within 3s, kill it! */
|
/* if PID isn't collected within SVC_TERM_TIMEOUT msec, kill it! */
|
||||||
if ((*state == SVC_STOPPING_STATE) &&
|
if ((*state == SVC_STOPPING_STATE) && !svc_is_inetd(svc)) {
|
||||||
!svc_is_inetd(svc)) {
|
|
||||||
service_timeout_cancel(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_FDS 64 /* Max number of I/O plugins */
|
||||||
#define MAX_NUM_SVC_ARGS 32
|
#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
|
* Default enable for all services, can be stopped by means
|
||||||
* of issuing an initctl call. E.g.
|
* of issuing an initctl call. E.g.
|
||||||
|
|||||||
Reference in new issue
Block a user