Support for sig_passthrough option of Net::Server #68

Closed
wreis opened this Issue Apr 9, 2013 · 13 comments

3 participants

@wreis

Hi,
I couldn't find any way to set sig_passthrough option for Net::Server out of box. Please advise if there is any known path, otherwise I will be happy to try and do a patch.

@miyagawa
Owner
@wreis

Logfile rotation with logging controlled by Log4perl.

@miyagawa
Owner
@wreis

The log4perl related params in order to have it adding the signal handler for file recreation is processed from its config file - in my case, set from config-file of the application. So, it can be done with the current interface.

@miyagawa
Owner

Just curious, can you show me how? config file of which?

I thought log4perl support is baked in Net::Server but i might be confusing with something else.

@wreis
@miyagawa
Owner

Yes it's clearer. And it's unfortunate that the USR1 conflicts with what Unicorn's log rotation flags, so i might have to think about it. http://unicorn.bogomips.org/SIGNALS.html

(This is why I ask what you want to achieve with that change, so that it won't conflict with my design process.)

@wreis

Right. That is good discussion anyway and makes sense as base for documentation. :)

The good thing is that it does not need to be USR1 as it is totally parametrized. So, I could tell the log4perl to install another one (USR2 or whatever) and pass "--sig-passthrough USR2" to the server initialization.

@oschwald

We also ran into a similar situation where it would be very useful to set sig_passthrough for an internal use of SIGUSR1. Would you accept a pull request to allow setting this?

@miyagawa
Owner

#111 added passing through Net::Server options with the --net_server- prefix (or via directly creating Starman::Server instance). Does that work for you?

@oschwald

Yes, it does. Thanks! The prefix seems to be --net_server_ rather than --net_server- though.

@miyagawa
Owner

No, it is --net_server-. (It actually accepts both)

@miyagawa miyagawa closed this Mar 3, 2015
@oschwald

Ah, ok. I just looked at the diff. I didn't realize Plack::Runner mangled the params before that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment