bug-coreutils
[Top][All Lists]
Advanced

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

Re: timeout --help --help


From: Pádraig Brady
Subject: Re: timeout --help --help
Date: Mon, 22 Mar 2010 01:20:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 21/03/10 16:16, Kim Hansen wrote:
> When testing the --kill-after I found the following strange behaviour:
>   address@hidden:~$ timeout --help --help
>   timeout: unrecognized option '--help'
>   Try `timeout --help' for more information.
>   address@hidden:~$
> 
> It looks like parse_long_options() only will give help or version if
> that is the only option passed to the program, the following change
> made the program behave like I expected it to do:

Well all of the following have that behavior:

$ grep -l parse_long_options *.c | sed 's/.c$//' | fmt
basename chroot cksum dd dirname echo expr getlimits hostid hostname
link logname nice nohup printf setuidgid sleep sync test timeout tsort
unlink uptime users whoami yes

The reason is that parse_long_options() only parses
options when there is a single option passed to the command.
It does this on purpose so as not to effect options that
may be passed on to further commands or requiring users
to specially mark such options.

cheers,
Pádraig.




reply via email to

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