summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klausmann <klausman@gentoo.org>2016-09-30 16:15:45 +0200
committerTobias Klausmann <klausman@gentoo.org>2016-09-30 16:17:45 +0200
commitf97ae47b8a4dd7b4959a019adf148390e3a182cf (patch)
tree9d52dd59a7d66ae466592cf08fffa970da419398 /sys-process/cronbase
parentsys-kernel/gentoo-sources: Cleanup of 4.1.X patchset (diff)
downloadgentoo-f97ae47b8a4dd7b4959a019adf148390e3a182cf.tar.gz
gentoo-f97ae47b8a4dd7b4959a019adf148390e3a182cf.tar.bz2
gentoo-f97ae47b8a4dd7b4959a019adf148390e3a182cf.zip
sys-process/cronbase: second attempt at fixing bug 595492
In the case of a stale lockfile, the old code still produces error messages: /usr/sbin/run-crons: line 61: /proc/6450/cmdline: No such file or directory This change should dodge that scenario.
Diffstat (limited to 'sys-process/cronbase')
-rw-r--r--sys-process/cronbase/cronbase-0.3.7-r3.ebuild (renamed from sys-process/cronbase/cronbase-0.3.7-r2.ebuild)0
-rwxr-xr-xsys-process/cronbase/files/run-crons-0.3.72
2 files changed, 1 insertions, 1 deletions
diff --git a/sys-process/cronbase/cronbase-0.3.7-r2.ebuild b/sys-process/cronbase/cronbase-0.3.7-r3.ebuild
index d263aeb11e0e..d263aeb11e0e 100644
--- a/sys-process/cronbase/cronbase-0.3.7-r2.ebuild
+++ b/sys-process/cronbase/cronbase-0.3.7-r3.ebuild
diff --git a/sys-process/cronbase/files/run-crons-0.3.7 b/sys-process/cronbase/files/run-crons-0.3.7
index c5f2d9ca7b33..ce8ff76e98bb 100755
--- a/sys-process/cronbase/files/run-crons-0.3.7
+++ b/sys-process/cronbase/files/run-crons-0.3.7
@@ -58,7 +58,7 @@ grab_lock() {
# another run-crons process.
# The tr call deletes null bytes so newer bash versions do not complain
# about them.
- cmdline1=$(tr -d '\0' < "/proc/${cronpid}/cmdline" 2>/dev/null) || :
+ cmdline1=$([ -r "/proc/${cronpid}/cmdline" ] && tr -d '\0' < "/proc/${cronpid}/cmdline" 2>/dev/null) || :
cmdline2=$(tr -d '\0' < /proc/$$/cmdline)
if [ "${cmdline1}" = "${cmdline2}" ] ; then
# Whoa, another run-crons is really running.