Github user pbchou commented on the pull request:

    https://github.com/apache/trafficserver/pull/571#issuecomment-219565721
  
    When there is an issue, typically the second plugin in the list will have 
corrupted values for its arguments as returned by getopt_long(). For example, 
it might return text from the first plugin's argument list.
    
    One interesting thing is that all plugins are using getopt_long() and not 
getopt(). I think getopt_long() is itself a GNU extension according to the man 
page. So does this mean optind = 0 will always be safe (since implies GNU 
library) or have other non GNU libraries implemented getopt_long also?
    
    Additional Notes:
    + There are 16 plugins making use of getopt_long(). There are 0 plugins 
using plain getopt(). The 15 mentioned in a prior comment was incorrect (-1 due 
to a local plugin, +2 due to two plugins not setting optind at all).
    + 10 plugins are using optind = 0.
    + 4 plugins are using optind = 1.
    + 2 plugins are using getopt_long but not setting optind at all. [epic, 
ssl_cert_loader]


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to