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

Bug#2011: very silly messages from rsh



Siggy Brentrup writes ("Re: Bug#2011: very silly messages from rsh"):
...
>     Peter> As you already said, it's the getopt bug + another libc4 bug.
>
> Would you please enlighten me, I can't see how a getopt bug is involved here:
>
> ~$ rsh beck -l elke pwd
> /home/elke
> ~$ rsh -l elke beck pwd
> /home/elke
> ~$ rsh -l nonexistent beck pwd
> beck: Address already in use
> ~$ rsh beck -l nonexistent pwd

See bugs 911 and 1685.  Basically, it's the following feature of GNU
getopt, which was misconceived and should be disabled (from libc.info,
node `Argument Syntax'):

      The implementation of `getopt' in the GNU C library normally makes
      it appear as if all the option arguments were specified before all
      the non-option arguments for the purposes of parsing, even if the
      user of your program intermixed option and non-option arguments.
      It does this by reordering the elements of the ARGV array.  This
      behavior is nonstandard; if you want to suppress it, define the
      `_POSIX_OPTION_ORDER' environment variable.  *Note Standard
      Environment::.

Ian.


Reply to: