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

Move Signals back from ZServer to Zope? #702

Open
d-maurer opened this issue Sep 12, 2019 · 7 comments
Open

Move Signals back from ZServer to Zope? #702

d-maurer opened this issue Sep 12, 2019 · 7 comments
Labels

Comments

@d-maurer
Copy link
Contributor

I am currently porting a Plone application to Plone5.2/Zope 4 and noticed a problem with its use of Signals.SignalHandler.registerHandler.

Formerly, Zope itself registered handlers for SIGINT and SIGTERM. When an application registered its own handlers, the default behaviour (stop the process) was activated after the application specific handlers. Nowadays, Zope no longer registers its own handlers (likely because Signals was moved to ZServer). When an application registers a signal handler for SIGINT or SIGTERM, the process no longer stops (unless the handler does the stopping).

Like webdav, Signals is not really ZServer dependent (i have the impression, that things not immediately fundamental to Zope had a tendency to get moved to ZServer). Should we move back Signals from ZServer to Zope and let Zope register again default signal handlers for SIGINT and SIGTERM?

@ale-rt
Copy link
Member

ale-rt commented Sep 12, 2019

@d-maurer nowadays Python has a built-in signal library and I think that the old Signals module should just go away.
I already replaced succesfully registerHandler from the old Signals module with signal.signal in this PR https://github.com/plone/plone.app.robotframework/pull/98/files.

I hope this helps!

@d-maurer
Copy link
Contributor Author

d-maurer commented Sep 12, 2019 via email

@ale-rt
Copy link
Member

ale-rt commented Sep 12, 2019

Ok! Thanks for sharing :)
Ignore my comment please!

@pbauer
Copy link
Member

pbauer commented Sep 12, 2019

I frequently used the option to use kill -s SIGUSR1 <PID_OF_ZOPE_INSTANCE> to get a stacktrace of a running instance without halting it. I'm not sure if that's directly related but if it would re-add this I'm 👍

@icemac
Copy link
Member

icemac commented Sep 13, 2019

I never used the Signals package. If it is useful, I could be resurrected from the ZServer grave.

If possible I'd prefer to have it in a separate package (outside) Zope and Zope not depending on it: Each additional module in the core increases the maintenance burden; especially if it is only needed for very specific use cases.

@d-maurer
Copy link
Contributor Author

d-maurer commented Sep 13, 2019 via email

@icemac
Copy link
Member

icemac commented Sep 17, 2019

So it is not in addition to the Zope features but requires at least a bit of interaction.
But this should not hinder putting Signals into a separate package. (Having it there does not need to mean it can be used elsewhere but instead that Zope can live without it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants