GNU bug report logs - #9102
"timeout 0 FOO" should timeout right away

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Paul Eggert <eggert@HIDDEN>; dated Sat, 16 Jul 2011 19:35:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 19 Jul 2011 22:41:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 19 18:41:28 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QjIyk-0007g9-Ly
	for submit <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:41:27 -0400
Received: from mail-yw0-f44.google.com ([209.85.213.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <james@HIDDEN>) id 1QjIyh-0007fv-9v
	for 9102 <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:41:24 -0400
Received: by ywp31 with SMTP id 31so2112943ywp.3
	for <9102 <at> debbugs.gnu.org>; Tue, 19 Jul 2011 15:41:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.203.13 with SMTP id a13mr3126230ybg.78.1311115277548; Tue,
	19 Jul 2011 15:41:17 -0700 (PDT)
Received: by 10.151.110.15 with HTTP; Tue, 19 Jul 2011 15:41:17 -0700 (PDT)
In-Reply-To: <4E260297.7090101@HIDDEN>
References: <4E21E7AA.60806@HIDDEN> <4E22D61F.2020802@HIDDEN>
	<4E23331E.8010609@HIDDEN>
	<CAGwX7676pOyyRLQbpfePSEdcV6mLC+_0eH39wp9bise5yWwPDQ@HIDDEN>
	<4E260297.7090101@HIDDEN>
Date: Tue, 19 Jul 2011 23:41:17 +0100
X-Google-Sender-Auth: fvnfj0Qjb1o4-xH4Yg-rpjzQ8wY
Message-ID: <CAGwX766P83ShC9QQ9y0pYPJTEsXYT9+g7Bf_xB5Lg6nShcBggA@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
From: James Youngman <jay@HIDDEN>
To: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 9102
Cc: Paul Eggert <eggert@HIDDEN>, 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.6 (---)

2011/7/19 P=C3=A1draig Brady <P@HIDDEN>:
> On 19/07/11 23:00, James Youngman wrote:
>> 2011/7/17 Paul Eggert <eggert@HIDDEN>:
>>> On 07/17/11 05:31, P=C3=A1draig Brady wrote:
>>>> Well my reasoning for having "0" mean don't timeout,
>>>> was to have an easy way in scripts to specify no timeout
>>>
>>> That's a good thing to have, but it could be specified in
>>> a different way. =C2=A0One possibility is the '1' (digit 1) option,
>>> e.g., =C2=A0"timeout -1 FOO". =C2=A0Or if that's too clever, we could
>>> use some other letter for the option.
>>
>> I'm not sure that's worked out so well for tail. =C2=A0 But if we are
>> looking for an argument indicating we don't want a timeout, the
>> argument "never" is quite clear.
>
> I don't follow (pardon the pun).
> This will "sleep(0)" between polls which takes 10% of my cpu here:
>
> =C2=A0tail ---disable -s0 -F nosuch

Sorry about the lack of clarity.  I was referring to the mess over
"tail -n 30", "tail -30", "tail +30" etc. and more specifically was
trying to indicate that I didn't think "timeout -0" would be a useful
direction, for that reason.  I'd suggest that Paul's shell snippet
could usefully be:

timeout=3Dnever
[ "$platform" =3D "buggy" ] && timeout=3D10
timeout $timeout command

James.


--=20
This email is intended solely for the use of its addressee, sender,
and any readers of a mailing list archive in which it happens to
appear. =C2=A0 If you have received this email in error, please say or type
three times, "I believe in the utility of email disclaimers," and then
reply to the author correcting any spellings (and, optionally, any
incorrect spellings), accompanying these with humorous jests about the
author's parentage. =C2=A0 If you are not the addressee, you are
nevertheless permitted to both copy and forward this email since
without such permissions email systems are unable to transmit email to
anybody, intended recipient or not. =C2=A0To those still reading by this
point, the author would like to apologise for being unable to maintain
a consistent level of humour throughout this disclaimer. =C2=A0Contents may
settle during transit. =C2=A0Do not feed the animals.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 19 Jul 2011 22:20:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 19 18:20:23 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QjIeN-0007BG-5E
	for submit <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:20:23 -0400
Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <P@HIDDEN>) id 1QjIeL-0007B1-7N
	for 9102 <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:20:22 -0400
Received: (qmail 37392 invoked from network); 19 Jul 2011 22:20:15 -0000
Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218)
	by mail1.slb.deg.dub.stisp.net with SMTP; 19 Jul 2011 22:20:15 -0000
Message-ID: <4E260297.7090101@HIDDEN>
Date: Tue, 19 Jul 2011 23:17:59 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
MIME-Version: 1.0
To: James Youngman <jay@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
References: <4E21E7AA.60806@HIDDEN>	<4E22D61F.2020802@HIDDEN>	<4E23331E.8010609@HIDDEN>
	<CAGwX7676pOyyRLQbpfePSEdcV6mLC+_0eH39wp9bise5yWwPDQ@HIDDEN>
In-Reply-To: <CAGwX7676pOyyRLQbpfePSEdcV6mLC+_0eH39wp9bise5yWwPDQ@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 9102
Cc: Paul Eggert <eggert@HIDDEN>, 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On 19/07/11 23:00, James Youngman wrote:
> 2011/7/17 Paul Eggert <eggert@HIDDEN>:
>> On 07/17/11 05:31, Pádraig Brady wrote:
>>> Well my reasoning for having "0" mean don't timeout,
>>> was to have an easy way in scripts to specify no timeout
>>
>> That's a good thing to have, but it could be specified in
>> a different way.  One possibility is the '1' (digit 1) option,
>> e.g.,  "timeout -1 FOO".  Or if that's too clever, we could
>> use some other letter for the option.
> 
> I'm not sure that's worked out so well for tail.   But if we are
> looking for an argument indicating we don't want a timeout, the
> argument "never" is quite clear.

I don't follow (pardon the pun).
This will "sleep(0)" between polls which takes 10% of my cpu here:

  tail ---disable -s0 -F nosuch

cheers,
Pádraig.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 19 Jul 2011 22:00:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 19 18:00:18 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QjIKv-0006kQ-Cc
	for submit <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:00:18 -0400
Received: from mail-yx0-f172.google.com ([209.85.213.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <james@HIDDEN>) id 1QjIKs-0006kD-UV
	for 9102 <at> debbugs.gnu.org; Tue, 19 Jul 2011 18:00:15 -0400
Received: by yxp4 with SMTP id 4so2146419yxp.3
	for <9102 <at> debbugs.gnu.org>; Tue, 19 Jul 2011 15:00:09 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.63.16 with SMTP id l16mr4865250yba.306.1311112809034; Tue,
	19 Jul 2011 15:00:09 -0700 (PDT)
Received: by 10.151.110.15 with HTTP; Tue, 19 Jul 2011 15:00:09 -0700 (PDT)
In-Reply-To: <4E23331E.8010609@HIDDEN>
References: <4E21E7AA.60806@HIDDEN> <4E22D61F.2020802@HIDDEN>
	<4E23331E.8010609@HIDDEN>
Date: Tue, 19 Jul 2011 23:00:09 +0100
X-Google-Sender-Auth: 8OlS8lSm-YOqC-fcUBfsdbjhPns
Message-ID: <CAGwX7676pOyyRLQbpfePSEdcV6mLC+_0eH39wp9bise5yWwPDQ@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
From: James Youngman <jay@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.6 (---)
X-Debbugs-Envelope-To: 9102
Cc: =?UTF-8?Q?P=C3=A1draig_Brady?= <P@HIDDEN>, 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.6 (---)

2011/7/17 Paul Eggert <eggert@HIDDEN>:
> On 07/17/11 05:31, P=C3=A1draig Brady wrote:
>> Well my reasoning for having "0" mean don't timeout,
>> was to have an easy way in scripts to specify no timeout
>
> That's a good thing to have, but it could be specified in
> a different way. =C2=A0One possibility is the '1' (digit 1) option,
> e.g., =C2=A0"timeout -1 FOO". =C2=A0Or if that's too clever, we could
> use some other letter for the option.

I'm not sure that's worked out so well for tail.   But if we are
looking for an argument indicating we don't want a timeout, the
argument "never" is quite clear.

James.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 17 Jul 2011 19:08:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 17 15:08:43 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QiWhm-0002nt-Ri
	for submit <at> debbugs.gnu.org; Sun, 17 Jul 2011 15:08:43 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1QiWhk-0002nc-Fs
	for 9102 <at> debbugs.gnu.org; Sun, 17 Jul 2011 15:08:41 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 856E739E80F2;
	Sun, 17 Jul 2011 12:08:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 2659Pz6BiHnd; Sun, 17 Jul 2011 12:08:34 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1B6AF39E80E1;
	Sun, 17 Jul 2011 12:08:34 -0700 (PDT)
Message-ID: <4E23331E.8010609@HIDDEN>
Date: Sun, 17 Jul 2011 12:08:14 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
References: <4E21E7AA.60806@HIDDEN> <4E22D61F.2020802@HIDDEN>
In-Reply-To: <4E22D61F.2020802@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 9102
Cc: 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On 07/17/11 05:31, P=C3=A1draig Brady wrote:
> Well my reasoning for having "0" mean don't timeout,
> was to have an easy way in scripts to specify no timeout

That's a good thing to have, but it could be specified in
a different way.  One possibility is the '1' (digit 1) option,
e.g.,  "timeout -1 FOO".  Or if that's too clever, we could
use some other letter for the option.

> If we do I guess `timeout` should immediately exit(124).
> This change in behavior would need a mention in NEWS anyway.

Yes, that'd make sense.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 17 Jul 2011 12:33:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 17 08:33:39 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QiQXT-0001UK-2h
	for submit <at> debbugs.gnu.org; Sun, 17 Jul 2011 08:33:39 -0400
Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <P@HIDDEN>) id 1QiQXR-0001U9-Bs
	for 9102 <at> debbugs.gnu.org; Sun, 17 Jul 2011 08:33:37 -0400
Received: (qmail 67901 invoked from network); 17 Jul 2011 12:33:31 -0000
Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218)
	by mail1.slb.deg.dub.stisp.net with SMTP; 17 Jul 2011 12:33:31 -0000
Message-ID: <4E22D61F.2020802@HIDDEN>
Date: Sun, 17 Jul 2011 13:31:27 +0100
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
References: <4E21E7AA.60806@HIDDEN>
In-Reply-To: <4E21E7AA.60806@HIDDEN>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 9102
Cc: 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On 16/07/11 20:34, Paul Eggert wrote:
> "sleep 0" sleeps for zero seconds, and "timeout 0 FOO"
> should timeout in zero seconds as well.  Currently,
> it doesn't; it times out in an infinite number of seconds.
> I see why, from the internals (alarm (0) is a special
> call intended to cancel alarms).  However, 'timeout' shouldn't
> be exposing those internals to users; it should behave like
> 'sleep' does, as that's more consistent.

Well my reasoning for having "0" mean don't timeout,
was to have an easy way in scripts to specify no timeout, like:

timeout=0 # none
[ "$platform" = "buggy" ] && timeout=10
timeout $timeout command

I'm unsure whether to make this change.
If we do I guess `timeout` should immediately exit(124).
This change in behavior would need a mention in NEWS anyway.

cheers,
Pádraig.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 16 Jul 2011 22:28:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 16 18:28:04 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QiDL9-0004q3-Ni
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 18:28:03 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1QiDL8-0004pU-HF
	for 9102 <at> debbugs.gnu.org; Sat, 16 Jul 2011 18:28:03 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 801C239E80F2;
	Sat, 16 Jul 2011 15:27:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Dolp3wLU00d9; Sat, 16 Jul 2011 15:27:56 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id EA51F39E80E1;
	Sat, 16 Jul 2011 15:27:55 -0700 (PDT)
Message-ID: <4E22106B.6020608@HIDDEN>
Date: Sat, 16 Jul 2011 15:27:55 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: Alan Curry <pacman-cu@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
References: <4E21E7AA.60806@HIDDEN>
	<20110716220844.4031.qmail@HIDDEN>
In-Reply-To: <20110716220844.4031.qmail@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 9102
Cc: 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On 07/16/11 15:08, Alan Curry wrote:
> What's the difference between running a command with a 0 second timeout
> and not running the command at all? It could be killed before it even gets
> scheduled.

Yes, exactly.  "timeout 0 FOO" should be the limit case for

timeout 1 FOO
timeout 0.1 FOO
timeout 0.01 FOO
timeout 0.001 FOO

That is, its behavior shouldn't diverge markedly from that of
"timeout 1e-300 FOO".




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at 9102 <at> debbugs.gnu.org:


Received: (at 9102) by debbugs.gnu.org; 16 Jul 2011 22:08:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 16 18:08:53 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QiD2a-0004PL-AU
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 18:08:52 -0400
Received: from c-67-162-90-113.hsd1.in.comcast.net ([67.162.90.113]
	helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <pacman-cu@HIDDEN>) id 1QiD2Y-0004P9-PK
	for 9102 <at> debbugs.gnu.org; Sat, 16 Jul 2011 18:08:51 -0400
Received: (qmail 4032 invoked by uid 1000); 16 Jul 2011 22:08:44 -0000
Message-ID: <20110716220844.4031.qmail@HIDDEN>
From: "Alan Curry" <pacman-cu@HIDDEN>
Subject: Re: bug#9102: "timeout 0 FOO" should timeout right away
To: eggert@HIDDEN (Paul Eggert)
Date: Sat, 16 Jul 2011 17:08:44 -0500 (GMT+5)
In-Reply-To: <4E21E7AA.60806@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 9102
Cc: 9102 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.8 (/)

Paul Eggert writes:
> 
> "sleep 0" sleeps for zero seconds, and "timeout 0 FOO"
> should timeout in zero seconds as well.  Currently,
> it doesn't; it times out in an infinite number of seconds.
> I see why, from the internals (alarm (0) is a special
> call intended to cancel alarms).  However, 'timeout' shouldn't
> be exposing those internals to users; it should behave like
> 'sleep' does, as that's more consistent.
> 

What's the difference between running a command with a 0 second timeout
and not running the command at all? It could be killed before it even gets
scheduled.

-- 
Alan Curry




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Jul 2011 19:34:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 16 15:34:21 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QiAd2-0004zg-Nc
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 15:34:20 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1QiAd1-0004zW-8Q
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 15:34:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1QiAcu-0007rN-RS
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 15:34:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:45619)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1QiAcu-0007rB-Ii
	for submit <at> debbugs.gnu.org; Sat, 16 Jul 2011 15:34:12 -0400
Received: from eggs.gnu.org ([140.186.70.92]:43301)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1QiAcs-0007lx-Ic
	for bug-coreutils@HIDDEN; Sat, 16 Jul 2011 15:34:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1QiAcq-0007qs-VW
	for bug-coreutils@HIDDEN; Sat, 16 Jul 2011 15:34:10 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:39802)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1QiAcq-0007qi-FM
	for bug-coreutils@HIDDEN; Sat, 16 Jul 2011 15:34:08 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 821F539E80E1
	for <bug-coreutils@HIDDEN>; Sat, 16 Jul 2011 12:34:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 2EbireMjTUzs for <bug-coreutils@HIDDEN>;
	Sat, 16 Jul 2011 12:34:03 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 736B5A60002
	for <bug-coreutils@HIDDEN>; Sat, 16 Jul 2011 12:34:02 -0700 (PDT)
Message-ID: <4E21E7AA.60806@HIDDEN>
Date: Sat, 16 Jul 2011 12:34:02 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: bug-coreutils@HIDDEN
Subject: "timeout 0 FOO" should timeout right away
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

"sleep 0" sleeps for zero seconds, and "timeout 0 FOO"
should timeout in zero seconds as well.  Currently,
it doesn't; it times out in an infinite number of seconds.
I see why, from the internals (alarm (0) is a special
call intended to cancel alarms).  However, 'timeout' shouldn't
be exposing those internals to users; it should behave like
'sleep' does, as that's more consistent.




Acknowledgement sent to Paul Eggert <eggert@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9102; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.