Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS-3245: Fixed reset of getopt_long() global variables between plugin initialization calls to allow #696

Closed
wants to merge 1 commit into from

Conversation

pbchou
Copy link
Contributor

@pbchou pbchou commented Jun 7, 2016

     multiple global plugins to co-exist in the plugin.config file.
     Also, made the same changes to allow remap plugins to co-exist
     with each other in the remap.config file.

     Specifically, on freebsd and darwin platforms we use
     'optreset = 1' to reset the getopt_long() command line parser.
     On Linux/glibc we use 'optind = 0' to reset the parser.
     The parser must be reset between uses such as first loading
     one plugin and then another.

     The setting of these variables is now performed in ATS core
     before the plugin initialization functions are called. The
     setting of these variables inside of the individual plugins
     has been removed. If a plugin needs to call getopt_long()
     outside of the plugin global or remap intializations,
     it should use the code in proxy/Plugin.cc as an example.

         multiple global plugins to co-exist in the plugin.config file.
         Also, made the same changes to allow remap plugins to co-exist
         with each other in the remap.config file.

         Specifically, on freebsd and darwin platforms we use
         'optreset = 1' to reset the getopt_long() command line parser.
         On Linux/glibc we use 'optind = 0' to reset the parser.
         The parser must be reset between uses such as first loading
         one plugin and then another.

         The setting of these variables is now performed in ATS core
         before the plugin initialization functions are called. The
         setting of these variables inside of the individual plugins
         has been removed. If a plugin needs to call getopt_long()
         outside of the plugin global or remap intializations,
         it should use the code in proxy/Plugin.cc as an example.
@zwoop
Copy link
Contributor

zwoop commented Jun 7, 2016

Can we change the Subject line of this to describe what this fixes?

@zwoop zwoop added the TS API label Jun 7, 2016
@zwoop zwoop added this to the 7.0.0 milestone Jun 7, 2016
@pbchou pbchou changed the title TS-3245: Made changes based on input from James Peach to allow TS-3245: Fixed reset of getopt_long() global variables between plugin initialization to allow Jun 7, 2016
@pbchou pbchou changed the title TS-3245: Fixed reset of getopt_long() global variables between plugin initialization to allow TS-3245: Fixed reset of getopt_long() global variables between plugin initialization calls to allow Jun 7, 2016
@zwoop
Copy link
Contributor

zwoop commented Jun 7, 2016

[approve ci]

@atsci
Copy link

atsci commented Jun 7, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/74/ for details.

@asfgit asfgit closed this in 590edf6 Jun 8, 2016
ogoodman pushed a commit to ogoodman/trafficserver that referenced this pull request Aug 20, 2016
Allow multiple global plugins to co-exist in the plugin.config
file. Also, made the same changes to allow remap plugins
to co-exist with each other in the remap.config file.

Specifically, on freebsd and darwin platforms we use 'optreset =
1' to reset the getopt_long() command line parser.  On Linux/glibc
we use 'optind = 0' to reset the parser.  The parser must be reset
between uses such as first loading one plugin and then another.

The setting of these variables is now performed in ATS core before
the plugin initialization functions are called. The setting of these
variables inside of the individual plugins has been removed. If a
plugin needs to call getopt_long() outside of the plugin global or
remap intializations, it should use the code in proxy/Plugin.cc as
an example.

This closes apache#696.
@zwoop zwoop modified the milestone: 7.0.0 May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants