From 6df6fc2361ceb6c1226e31f76ce479ccda9fd303 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Mon, 2 Feb 2015 16:13:07 +0100 Subject: [PATCH] pid of cronjob is the part after the last dash (we did not have more then one before), fixes #1483 Signed-off-by: Michael Kaufmann (d00p) --- lib/cron_init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cron_init.php b/lib/cron_init.php index 64a77e78..1eca77b1 100644 --- a/lib/cron_init.php +++ b/lib/cron_init.php @@ -118,7 +118,7 @@ while ($fName = readdir($lockDirHandle)) { } // Check if cron is running or has died. - $check_pid = substr(strstr($fName, "-"), 1); + $check_pid = substr(strrchr($fName, "-"), 1); system("kill -CHLD " . (int)$check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return); if ($check_pid_return == 1) {