summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klausmann <klausman@gentoo.org>2016-10-03 19:17:57 +0200
committerTobias Klausmann <klausman@gentoo.org>2016-10-03 19:19:08 +0200
commitd2d619f187661a12b4ed0dfed504fba057251f92 (patch)
tree776ae1f5b06e2b5140db0ded5f47ae27a89f51d6 /sys-process/cronbase
parentdev-ml/findlib: bump to 1.6.3 (diff)
downloadgentoo-d2d619f187661a12b4ed0dfed504fba057251f92.tar.gz
gentoo-d2d619f187661a12b4ed0dfed504fba057251f92.tar.bz2
gentoo-d2d619f187661a12b4ed0dfed504fba057251f92.zip
sys-process/cronbase: Fix the parall-job check once and for all.
Thanks to Dan Goodliffe for suggesting this approach. Gentoo-Bug: 595492
Diffstat (limited to 'sys-process/cronbase')
-rw-r--r--sys-process/cronbase/cronbase-0.3.7-r5.ebuild (renamed from sys-process/cronbase/cronbase-0.3.7-r4.ebuild)0
-rwxr-xr-xsys-process/cronbase/files/run-crons-0.3.76
2 files changed, 1 insertions, 5 deletions
diff --git a/sys-process/cronbase/cronbase-0.3.7-r4.ebuild b/sys-process/cronbase/cronbase-0.3.7-r5.ebuild
index d263aeb11e0e..d263aeb11e0e 100644
--- a/sys-process/cronbase/cronbase-0.3.7-r4.ebuild
+++ b/sys-process/cronbase/cronbase-0.3.7-r5.ebuild
diff --git a/sys-process/cronbase/files/run-crons-0.3.7 b/sys-process/cronbase/files/run-crons-0.3.7
index 958ef06c1ef7..902794e19e6f 100755
--- a/sys-process/cronbase/files/run-crons-0.3.7
+++ b/sys-process/cronbase/files/run-crons-0.3.7
@@ -56,11 +56,7 @@ grab_lock() {
# This is better than kill -0 because we can verify that it's really
# another run-crons process.
- # The tr call deletes null bytes so newer bash versions do not complain
- # about them.
- cmdline1=$(sed -e 's/\0/ /g' "/proc/${cronpid}/cmdline" 2>/dev/null) || :
- cmdline2=$(sed -e 's/\0/ /g' /proc/$$/cmdline)
- if [ "${cmdline1}" = "${cmdline2}" ] ; then
+ if diff -qs /proc/{${cronpid},$$}/cmdline > /dev/null 2>&1; then
# Whoa, another run-crons is really running.
return 1
fi