bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7877: sleep takes undocumented hex args


From: Eric Blake
Subject: bug#7877: sleep takes undocumented hex args
Date: Fri, 21 Jan 2011 07:51:42 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/21/2011 06:03 AM, Jim Meyering wrote:
> address@hidden wrote:
>> You see I was trying to make very special arguments to sleep so that I
>> can make sure to kill the one I want
>>     pkill -u jidanni -fx sleep\ 000022
>> It is not clear if that will still work.
> 
> With today's change using "sleep 000022" will
> still act just like "sleep 22".
> 
> I could not change that (and would not want to!)
> without breaking with years of tradition.
> 
>> Maybe the man/info page should
>> say a regexp that matches all valid args.
> 
> It already describes the format pretty well,
> mentioning "floating point" and the four suffixes.

Floating point literals include hex-floats, such as 0x1p1.  Does today's
added pre-filtering to reject 0x1 accidentally also reject hex-float
literals?  (It's a bit of a shame that when hex-floats were added that
strtod() was altered to accept hex-float literals but as a side effect
it also started accepting hexadecimal values without the p[+-]?[0-9]+
exponent suffix).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]