Github user jpeach commented on the pull request:
https://github.com/apache/trafficserver/pull/571#issuecomment-219535666
``0`` is a GNU extension behaviour, from the [man
page](http://man7.org/linux/man-pages/man3/getopt.3.html):
```
... and wants to make use of GNU extensions such as '+' and '-' at the start
of optstring, or changes the value of POSIXLY_CORRECT between scans,
must reinitialize getopt() by resetting optind to 0, rather than the
traditional
value of 1.
```
This is probably where the confusion originates, since for glibc either
``0`` or ``1`` should work, depending on which part of the man page the author
read. On non-gllibc, ``1`` is the only value that would work. AFAIK we don't
have any plugins that use GNU extensions, so I recommend we reset ``optind`` to
``1`` in the plugin loader so that plugins always get the right behaviour by
default.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---