Change semantics for SysV start/stop scripts

If a start/stop script returns OK we classify it as 'started' and leave
it in running state, despite having collected its PID.  This way we can
track what scripts need to be called with 'stop' when changing to a
runlevel they are not declared for.

Also, clean up related debug messages from earlier commit.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2020-02-05 12:35:15 +01:00
1 parent 9a9a9f4bfe
commit 3b67afe480
2 files changed
+15 -25

No files matched your search

+1
View File
@@ -98,6 +98,7 @@ typedef struct svc {
pid_t pid;
char pidfile[256];
long start_time; /* Start time, as seconds since boot, from sysinfo() */
int started; /* Set for run/task/sysv to track if started */
int status; /* From waitpid() when process is collected */
const svc_state_t state; /* Paused, Reloading, Restart, Running, ... */
svc_type_t type; /* Service, run, task, inetd, ... */