On Tue, Nov 11, 2008 at 07:41:25PM -0600, John Hasler wrote: > Peter writes: > > Well, this is actually bog-standard getopt(3) behavior... > > It is standard getopt() behavior to permute the arguments, whence comes the > bug. The '+' in the patch below stops it from doing so.
Oof! Sorry - that's what comes out of my forgetting to drop you an e-mail yesterday. Yes, it is actually the normal behavior of *the GNU version of getopt* to allow the user to mix options and non-option arguments. It is a GNU extension, though, which might explain why I haven't noticed it while developing timelimit on other systems :) This was even discussed a month ago in the Russian mailing list for Debian, but I did not make the connection to timelimit then :) Yesterday, I saw your previous message with the serious problem (grep -q), took a long look at the Linux getopt(3) manual page, found the "+" workaround, and actually applied it to the upstream repository of timelimit - but forgot to drop you an e-mail! Sorry for the additional work that you had to duplicate :( I've released timelimit-1.4 today, uploaded a Debian package to mentors.d.n, and will now send a note to my usual sponsor. Do you think that this is important enough to warrant a timelimit-1.1-3+lenny1 upload to testing-proposed-updates? Of course, it would ultimately be for the release engineers to decide :) > I've also > replaced 'EOF' with '-1' because the latter is what getopt() returns. > 'EOF' is a macro which is usually defined as '-1' but is not guaranteed to > be. Argh, true. This is actually a longstanding bad habit of mine, dating back to, lemme see, the beginning of 1997, when the FreeBSD manual page for getopt(3) actually described it as returning EOF at the end of processing. A couple of months later, the FreeBSD manpage was corrected, but my own habit remained. Thanks for spotting this, I think it will be in timelimit-1.5 soon. G'luck, Peter -- Peter Pentchev [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 This would easier understand fewer had omitted.
pgpSxjzPep2SW.pgp
Description: PGP signature

