scron

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

commit 08dadfafe70820ddfff4a19cca43119a51a832b8
parent f699c789462fd693597a36d4fc6df700d5f51f89
Author: sin <sin@2f30.org>
Date:   Mon,  7 Jul 2014 08:21:19 +0100

Run child in a new session

Diffstat:
Mcrond.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/crond.c b/crond.c @@ -116,6 +116,7 @@ runjob(char *cmd) logerr("error: failed to fork job: %s time: %s", cmd, ctime(&t)); } else if (pid == 0) { + setsid(); loginfo("run: %s pid: %d at %s", cmd, getpid(), ctime(&t)); execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);