This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getopt() argument permuting considered risky


Thought I could mention a story about the getopt argument permutation:
For my fork of GNU InetUtils I received a patch that would add "+" to
disable the permutation, because this command:

rsh sol tail -f /var/log/mail

Would get permuted into:

rsh -f sol tail /var/log/mail

And the getopt command line parser would try to interpret the '-f',
which would fail.

On the ranting side, I think it would have been better if this feature
had originally been introduced via a separate API, say getopt_gnu,
instead.  That would have minimized surprises, both pleasant and
unpleasant ones.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]