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 27C15138330 for ; Mon, 3 Oct 2016 17:19:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B63DE0B82; Mon, 3 Oct 2016 17:19:15 +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 1EC4AE0B82 for ; Mon, 3 Oct 2016 17:19:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 DA6CA340EBD for ; Mon, 3 Oct 2016 17:19:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F34A2480 for ; Mon, 3 Oct 2016 17:19:12 +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: <1475515148.d2d619f187661a12b4ed0dfed504fba057251f92.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-r4.ebuild sys-process/cronbase/cronbase-0.3.7-r5.ebuild sys-process/cronbase/files/run-crons-0.3.7 X-VCS-Directories: sys-process/cronbase/ sys-process/cronbase/files/ X-VCS-Committer: klausman X-VCS-Committer-Name: Tobias Klausmann X-VCS-Revision: d2d619f187661a12b4ed0dfed504fba057251f92 X-VCS-Branch: master Date: Mon, 3 Oct 2016 17:19:12 +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: 1779c996-8568-4103-bc0f-f8adc7750174 X-Archives-Hash: 4bf3bfb60363a55f33cace102646eef0 commit: d2d619f187661a12b4ed0dfed504fba057251f92 Author: Tobias Klausmann gentoo org> AuthorDate: Mon Oct 3 17:17:57 2016 +0000 Commit: Tobias Klausmann gentoo org> CommitDate: Mon Oct 3 17:19:08 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2d619f1 sys-process/cronbase: Fix the parall-job check once and for all. Thanks to Dan Goodliffe for suggesting this approach. Gentoo-Bug: 595492 .../cronbase/{cronbase-0.3.7-r4.ebuild => cronbase-0.3.7-r5.ebuild} | 0 sys-process/cronbase/files/run-crons-0.3.7 | 6 +----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sys-process/cronbase/cronbase-0.3.7-r4.ebuild b/sys-process/cronbase/cronbase-0.3.7-r5.ebuild similarity index 100% rename from sys-process/cronbase/cronbase-0.3.7-r4.ebuild rename to 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 958ef06..902794e 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