[Patch 1/2]: System reconfiguration causing system freeze

This patch fixes a hang when performing a system reconfiguration using
`initctl reload`, `SIGHUP` or running `(f)init q`, which caused Finit
to wait for SIGHUP:able services to stop.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-12-02 13:02:40 +01:00
1 parent a5c5a5c644
commit 4c3e053041
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -430,7 +430,9 @@ void service_stop_dynamic(void)
if (svc_is_removed(svc))
new_state = SVC_HALTED_STATE;
dyn_stop_cnt++;
if (!svc_has_sighup(svc))
dyn_stop_cnt++;
_d("Marking service %s as state %d", svc->cmd, new_state);
service_stop(svc, new_state);
}
+1
View File
@@ -152,6 +152,7 @@ int svc_next_id (char *cmd);
int svc_is_unique (svc_t *svc);
static inline int svc_in_runlevel(svc_t *svc, int runlevel) { return svc && ISSET(svc->runlevels, runlevel); }
static inline int svc_has_sighup(svc_t *svc) { return svc && 0 != svc->sighup; }
static inline int svc_is_dynamic(svc_t *svc) { return svc && 0 != svc->mtime; }
static inline int svc_is_removed(svc_t *svc) { return svc && -1 == svc->dirty; }