mirror of
https://github.com/troglobit/finit.git
synced 2026-11-29 21:08:21 +00:00
commit
4efdc4fe19
3 files changed
+8
-3
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ static void pidfile_callback(void *UNUSED(arg), int fd, int UNUSED(events))
|
||||
|
||||
sz = read(fd, ev_buf, sizeof(ev_buf) - 1);
|
||||
if (sz <= 0) {
|
||||
_pe("invalid inotify event\n");
|
||||
_pe("invalid inotify event");
|
||||
return;
|
||||
}
|
||||
ev_buf[sz] = 0;
|
||||
|
||||
@@ -429,8 +429,10 @@ char *svc_status(svc_t *svc)
|
||||
case SVC_BLOCK_INETD_BUSY:
|
||||
return "busy";
|
||||
}
|
||||
|
||||
case SVC_DONE_STATE:
|
||||
return "done";
|
||||
|
||||
case SVC_STOPPING_STATE:
|
||||
switch (svc->type) {
|
||||
case SVC_TYPE_INETD_CONN:
|
||||
@@ -440,10 +442,13 @@ char *svc_status(svc_t *svc)
|
||||
default:
|
||||
return "stopping";
|
||||
}
|
||||
|
||||
case SVC_WAITING_STATE:
|
||||
return "waiting";
|
||||
|
||||
case SVC_READY_STATE:
|
||||
return "ready";
|
||||
|
||||
case SVC_RUNNING_STATE:
|
||||
return "running";
|
||||
|
||||
@@ -460,7 +465,7 @@ const char *svc_dirtystr(svc_t *svc)
|
||||
return "updated";
|
||||
else if (svc_is_changed(svc))
|
||||
return "UNKNOWN";
|
||||
else
|
||||
|
||||
return "clean";
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ static inline int svc_has_sighup(svc_t *svc) { return svc && 0 != svc->sighup;
|
||||
|
||||
static inline void svc_starting (svc_t *svc) { svc->starting = 1; }
|
||||
static inline void svc_started (svc_t *svc) { svc->starting = 0; }
|
||||
static inline int svc_is_starting(svc_t *svc) { 0 != svc->starting; }
|
||||
static inline int svc_is_starting(svc_t *svc) { return 0 != svc->starting; }
|
||||
|
||||
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; }
|
||||
|
||||
Reference in new issue
Block a user