mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Change debug messages to use svc->cmd rather than empty svc->desc
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e439b79e82
commit
72c9681ffb
1 file changed
+5
-5
+5
-5
@@ -433,7 +433,7 @@ static int service_stop(svc_t *svc)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (svc->pid <= 1) {
|
if (svc->pid <= 1) {
|
||||||
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->desc);
|
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->cmd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -892,13 +892,13 @@ static void service_retry(svc_t *svc)
|
|||||||
|
|
||||||
if (svc->state != SVC_HALTED_STATE ||
|
if (svc->state != SVC_HALTED_STATE ||
|
||||||
svc->block != SVC_BLOCK_RESTARTING) {
|
svc->block != SVC_BLOCK_RESTARTING) {
|
||||||
_d("%s not crashing anymore", svc->desc);
|
_d("%s not crashing anymore", svc->cmd);
|
||||||
*restart_cnt = 0;
|
*restart_cnt = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*restart_cnt >= RESPAWN_MAX) {
|
if (*restart_cnt >= RESPAWN_MAX) {
|
||||||
logit(LOG_ERR, "%s keeps crashing, not restarting", svc->desc);
|
logit(LOG_ERR, "%s keeps crashing, not restarting", svc->cmd);
|
||||||
svc_crashing(svc);
|
svc_crashing(svc);
|
||||||
*restart_cnt = 0;
|
*restart_cnt = 0;
|
||||||
service_step(svc);
|
service_step(svc);
|
||||||
@@ -907,7 +907,7 @@ static void service_retry(svc_t *svc)
|
|||||||
|
|
||||||
(*restart_cnt)++;
|
(*restart_cnt)++;
|
||||||
|
|
||||||
_d("%s crashed, trying to start it again, attempt %d", svc->desc, *restart_cnt);
|
_d("%s crashed, trying to start it again, attempt %d", svc->cmd, *restart_cnt);
|
||||||
svc_unblock(svc);
|
svc_unblock(svc);
|
||||||
service_step(svc);
|
service_step(svc);
|
||||||
|
|
||||||
@@ -1037,7 +1037,7 @@ restart:
|
|||||||
* Restart directly after the first crash,
|
* Restart directly after the first crash,
|
||||||
* then retry after 2 sec
|
* then retry after 2 sec
|
||||||
*/
|
*/
|
||||||
_d("delayed restart of %s", svc->desc);
|
_d("delayed restart of %s", svc->cmd);
|
||||||
service_timeout_after(svc, 1, service_retry);
|
service_timeout_after(svc, 1, service_retry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user