Description
When multiple plugins that use getopt are chained, it doesn't work correctly for the subsequent plugins after the first plugin. jpeach@apache.org and zwoop suggested that the getopt globals need to be reset (example, optind = opterr = optopt = 0) before using it and would be better to do it in the core during plugin loading to keep it simple/transparent from plugin development.
Note that, if a plugin itself uses getopt multiple times on different argv's, it would have to reset the globals between them.
Attachments
Issue Links
- is duplicated by
-
TS-4252 Some plugins are causing seg-faults when using getopt_long with optind = 1.
- Resolved
- links to
(5 links to)