[
https://issues.apache.org/jira/browse/TS-3245?focusedWorklogId=31384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31384
]
ASF GitHub Bot logged work on TS-3245:
--------------------------------------
Author: ASF GitHub Bot
Created on: 01/Nov/16 15:33
Start Date: 01/Nov/16 15:33
Worklog Time Spent: 10m
Work Description: Github user PSUdaemon commented on the issue:
https://github.com/apache/trafficserver/pull/845
Please format this PR as outlined
[here](https://cwiki.apache.org/confluence/display/TS/Fall+2016+Summit?preview=/65866590/66849961/git_back_port_cherry_pick.pdf).
Issue Time Tracking
-------------------
Worklog Id: (was: 31384)
Time Spent: 1h 10m (was: 1h)
> getopt doesn't work correctly when used in plugin chaining
> ----------------------------------------------------------
>
> Key: TS-3245
> URL: https://issues.apache.org/jira/browse/TS-3245
> Project: Traffic Server
> Issue Type: Improvement
> Components: Plugins
> Affects Versions: 5.1.1
> Reporter: Sudheer Vinukonda
> Assignee: Peter Chou
> Priority: Minor
> Labels: newbie
> Fix For: 7.0.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> When multiple plugins that use getopt are chained, it doesn't work correctly
> for the subsequent plugins after the first plugin. [[email protected]] 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)