From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 96B9D138330 for ; Fri, 30 Sep 2016 14:17:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C77DAE09FC; Fri, 30 Sep 2016 14:17:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AE33CE09FC for ; Fri, 30 Sep 2016 14:17:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AEC54340988 for ; Fri, 30 Sep 2016 14:17:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DA07A248E for ; Fri, 30 Sep 2016 14:17:48 +0000 (UTC) From: "Tobias Klausmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tobias Klausmann" Message-ID: <1475245065.f97ae47b8a4dd7b4959a019adf148390e3a182cf.klausman@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/cronbase/files/, sys-process/cronbase/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/cronbase/cronbase-0.3.7-r2.ebuild sys-process/cronbase/cronbase-0.3.7-r3.ebuild sys-process/cronbase/files/run-crons-0.3.7 X-VCS-Directories: sys-process/cronbase/files/ sys-process/cronbase/ X-VCS-Committer: klausman X-VCS-Committer-Name: Tobias Klausmann X-VCS-Revision: f97ae47b8a4dd7b4959a019adf148390e3a182cf X-VCS-Branch: master Date: Fri, 30 Sep 2016 14:17:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1dfc2916-d061-4af3-b22c-0c48d962c0f4 X-Archives-Hash: 519341ffd23cf1354a94e41164f091a2 commit: f97ae47b8a4dd7b4959a019adf148390e3a182cf Author: Tobias Klausmann gentoo org> AuthorDate: Fri Sep 30 14:15:45 2016 +0000 Commit: Tobias Klausmann gentoo org> CommitDate: Fri Sep 30 14:17:45 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f97ae47b 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. .../cronbase/{cronbase-0.3.7-r2.ebuild => cronbase-0.3.7-r3.ebuild} | 0 sys-process/cronbase/files/run-crons-0.3.7 | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-process/cronbase/cronbase-0.3.7-r2.ebuild b/sys-process/cronbase/cronbase-0.3.7-r3.ebuild similarity index 100% rename from sys-process/cronbase/cronbase-0.3.7-r2.ebuild rename to 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 c5f2d9c..ce8ff76 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.