-
Notifications
You must be signed in to change notification settings - Fork 37
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
Request: forward all (well, most) signals to child process #240
Comments
Ah, you implemented that change to the PyInstaller bootloader after it had already influenced the staticx bootloader (167a585). No wonder it's not there! 😄 I agree, all signals should be forwarded, not just termination signals, with the exception of
I also think there's a mistake in pyinstaller/pyinstaller@2ddb80d in the bounds of the I'm experimenting with an implementation now, but I'm seeing some strange differences between |
Fixes #240 Inspired by pyinstaller/pyinstaller#3515
I've posted a draft PR in #242. The "strange differences" I was referring to were the fact that I'm still not sure we want to forward all signals 1-31 with I think we might consider instead an allowlist approach, including e.g.
|
So long as the allow list is configurable when running staticx (with some reasonable defaults as you listed), that sounds just fine to me. Thanks for looking into it! |
In my original case, I was wrapping a legacy application which arbitrarily used signal 42. (A lot has changed since 2018, though, and I could change this to something else now if needed.) |
I recently upgraded a Pyinstaller-built program to use Python 3.11. This resulted in the binary using a newer version of glibc than the target platform supported, which led me to discover staticx, without which this effort would be rather doomed. So first things first - thank you for building this. 🙂
Back when I first started using Pyinstaller, I noticed that most signals were not being forwarded to the child process. In particular, my program uses a somewhat arbitrary signal number to control the logging level of the child process. A more commonly-used example would be SIGHUP, which is often used to ask a daemon to reload its configuration from disk.
I made a change to the Pyinstaller bootloader back in 2018 whereby it forwards all signals (except
SIGCLD
/SIGCHLD
, because they're special) to the child process. I think something similar would work for staticx's (grammar...? 😅 ) bootloader, but I haven't had a chance to try it out yet.I might get some time to put together a PR for this, but I wanted to first open this issue so as to:
Thanks again!
The text was updated successfully, but these errors were encountered: