scron

simple cron daemon
git clone git://git.2f30.org/scron.git
Log | Files | Refs | README | LICENSE

commit 8dab3ad263a58c0c0391732de9926f21779f462f
parent 1b6aa25ff07e3bca31da4b0ede7920ab9e4a8ed3
Author: sin <sin@2f30.org>
Date:   Tue Jul 15 17:51:29 +0100

Report WIFSTOPPED() as well

Diffstat:
crond.c | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/crond.c b/crond.c @@ -182,16 +182,15 @@ waitjob(void) free(je->cmd); free(je); } - if (WIFSIGNALED(status) == 1) { - loginfo("complete: pid: %d terminated by signal: %d time: %s", - pid, WTERMSIG(status), ctime(&t)); - continue; - } - if (WIFEXITED(status) == 1) { + if (WIFEXITED(status) == 1) loginfo("complete: pid: %d returned: %d time: %s", pid, WEXITSTATUS(status), ctime(&t)); - continue; - } + else if (WIFSIGNALED(status) == 1) + loginfo("complete: pid: %d terminated by signal: %d time: %s", + pid, WTERMSIG(status), ctime(&t)); + else if (WIFSTOPPED(status) == 1) + loginfo("complete: pid: %d stopped by signal: %d time: %s", + pid, WSTOPSIG(status), ctime(&t)); } }