From unknown Sun Jun 15 08:54:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10912: timeout: document the exit status when run with "-s KILL" Resent-From: Rodrigo Campos Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 29 Feb 2012 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10912 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10912@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13305274645080 (code B ref -1); Wed, 29 Feb 2012 14:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Feb 2012 14:57:44 +0000 Received: from localhost ([127.0.0.1]:56182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2kyO-0001JY-9V for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49668) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2kyC-0001JB-I3 for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kxn-0007hu-7k for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxn-0007hn-4c for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxg-0003sH-Nn for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:57:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kxZ-0007ec-BE for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:57:00 -0500 Received: from alerce.vps.bitfolk.com ([85.119.82.134]:46301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxZ-0007dj-5f for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:56:53 -0500 Received: from [201.255.225.12] (helo=sdfg.com.ar) by alerce.vps.bitfolk.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1S2kxR-0002wq-Ep for bug-coreutils@gnu.org; Wed, 29 Feb 2012 11:56:46 -0300 Date: Wed, 29 Feb 2012 11:49:47 -0300 From: Rodrigo Campos Message-ID: <20120229144947.GA3077@sdfg.com.ar> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Please keep me in Cc: since I'm not subscribed. I find out that the exit code when a command times out is 128+9 (when run instede timeout :-D) rather than 124 when is run with "-s KILL". I found this by looking at the code (well, comments :)) where is pretty clear. This patch just adds this to the man page, so no one else checks for 124 and finds out it doesn't exit with that code :) I tried to copy the first line from other commits, but I might misunderstood the style. Also, I didn't compile test it, but it seems simple enough. Sorry in advance if the style is wrong or introduces a build issue. Please let me know and I'll fix it :S Thanks a lot, Rodrigo --VS++wcV0S1rZb1Fb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-maint-timeout-document-the-exit-status-when-run-with.patch" >From c02e417956fc300e17ef2c145bc87f7b6992c92d Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Wed, 29 Feb 2012 11:36:18 -0300 Subject: [PATCH] maint: timeout: document the exit status when run with "-s KILL" Although it was documented in code comments, it was not properly documented on the man page. --- src/timeout.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/timeout.c b/src/timeout.c index 73367c4..17f610c 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -236,7 +236,9 @@ If the command times out, then exit with status 124. Otherwise, exit\n\ with the status of COMMAND. If no signal is specified, send the TERM\n\ signal upon timeout. The TERM signal kills any process that does not\n\ block or catch that signal. For other processes, it may be necessary to\n\ -use the KILL (9) signal, since this signal cannot be caught.\n"), stdout); +use the KILL (9) signal, since this signal cannot be caught.\n +Also, if the KILL (9) signal is used, the exit status when the command times\n +out is 128+9 rather than 124.\n"), stdout); emit_ancillary_info (); } exit (status); -- 1.7.9 --VS++wcV0S1rZb1Fb-- From unknown Sun Jun 15 08:54:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Rodrigo Campos Subject: bug#10912: closed (Re: bug#10912: timeout: document the exit status when run with "-s KILL") Message-ID: References: <4F4E4802.6080902@draigBrady.com> <20120229144947.GA3077@sdfg.com.ar> X-Gnu-PR-Message: they-closed 10912 X-Gnu-PR-Package: coreutils Reply-To: 10912@debbugs.gnu.org Date: Wed, 29 Feb 2012 15:46:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1330530362-9405-1" This is a multi-part message in MIME format... ------------=_1330530362-9405-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #10912: timeout: document the exit status when run with "-s KILL" which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 10912@debbugs.gnu.org. --=20 10912: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10912 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1330530362-9405-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 10912-done) by debbugs.gnu.org; 29 Feb 2012 15:45:53 +0000 Received: from localhost ([127.0.0.1]:56238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2lip-0002Qz-Sk for submit@debbugs.gnu.org; Wed, 29 Feb 2012 10:45:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5616) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2lib-0002QY-Ny for 10912-done@debbugs.gnu.org; Wed, 29 Feb 2012 10:45:31 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1TFj9G4003316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 Feb 2012 10:45:09 -0500 Received: from [10.36.116.43] (ovpn-116-43.ams2.redhat.com [10.36.116.43]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1TFj61T019583 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 29 Feb 2012 10:45:08 -0500 Message-ID: <4F4E4802.6080902@draigBrady.com> Date: Wed, 29 Feb 2012 15:45:06 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Rodrigo Campos Subject: Re: bug#10912: timeout: document the exit status when run with "-s KILL" References: <20120229144947.GA3077@sdfg.com.ar> In-Reply-To: <20120229144947.GA3077@sdfg.com.ar> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id q1TFj9G4003316 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10912-done Cc: 10912-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On 02/29/2012 02:49 PM, Rodrigo Campos wrote: > Hi, >=20 > Please keep me in Cc: since I'm not subscribed. >=20 > I find out that the exit code when a command times out is 128+9 (when r= un > instede timeout :-D) rather than 124 when is run with "-s KILL". I foun= d this by > looking at the code (well, comments :)) where is pretty clear. >=20 > This patch just adds this to the man page, so no one else checks for 12= 4 and > finds out it doesn't exit with that code :) >=20 > I tried to copy the first line from other commits, but I might misunder= stood the > style. Also, I didn't compile test it, but it seems simple enough. Sorr= y in > advance if the style is wrong or introduces a build issue. Please let m= e know > and I'll fix it :S Slightly adjusted and pushed. thanks a lot, P=E1draig. ------------=_1330530362-9405-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Feb 2012 14:57:44 +0000 Received: from localhost ([127.0.0.1]:56182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2kyO-0001JY-9V for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49668) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2kyC-0001JB-I3 for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kxn-0007hu-7k for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:13 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxn-0007hn-4c for submit@debbugs.gnu.org; Wed, 29 Feb 2012 09:57:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxg-0003sH-Nn for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:57:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2kxZ-0007ec-BE for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:57:00 -0500 Received: from alerce.vps.bitfolk.com ([85.119.82.134]:46301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2kxZ-0007dj-5f for bug-coreutils@gnu.org; Wed, 29 Feb 2012 09:56:53 -0500 Received: from [201.255.225.12] (helo=sdfg.com.ar) by alerce.vps.bitfolk.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1S2kxR-0002wq-Ep for bug-coreutils@gnu.org; Wed, 29 Feb 2012 11:56:46 -0300 Date: Wed, 29 Feb 2012 11:49:47 -0300 From: Rodrigo Campos To: bug-coreutils@gnu.org Subject: timeout: document the exit status when run with "-s KILL" Message-ID: <20120229144947.GA3077@sdfg.com.ar> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Please keep me in Cc: since I'm not subscribed. I find out that the exit code when a command times out is 128+9 (when run instede timeout :-D) rather than 124 when is run with "-s KILL". I found this by looking at the code (well, comments :)) where is pretty clear. This patch just adds this to the man page, so no one else checks for 124 and finds out it doesn't exit with that code :) I tried to copy the first line from other commits, but I might misunderstood the style. Also, I didn't compile test it, but it seems simple enough. Sorry in advance if the style is wrong or introduces a build issue. Please let me know and I'll fix it :S Thanks a lot, Rodrigo --VS++wcV0S1rZb1Fb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-maint-timeout-document-the-exit-status-when-run-with.patch" >From c02e417956fc300e17ef2c145bc87f7b6992c92d Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Wed, 29 Feb 2012 11:36:18 -0300 Subject: [PATCH] maint: timeout: document the exit status when run with "-s KILL" Although it was documented in code comments, it was not properly documented on the man page. --- src/timeout.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/timeout.c b/src/timeout.c index 73367c4..17f610c 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -236,7 +236,9 @@ If the command times out, then exit with status 124. Otherwise, exit\n\ with the status of COMMAND. If no signal is specified, send the TERM\n\ signal upon timeout. The TERM signal kills any process that does not\n\ block or catch that signal. For other processes, it may be necessary to\n\ -use the KILL (9) signal, since this signal cannot be caught.\n"), stdout); +use the KILL (9) signal, since this signal cannot be caught.\n +Also, if the KILL (9) signal is used, the exit status when the command times\n +out is 128+9 rather than 124.\n"), stdout); emit_ancillary_info (); } exit (status); -- 1.7.9 --VS++wcV0S1rZb1Fb-- ------------=_1330530362-9405-1--