-
Notifications
You must be signed in to change notification settings - Fork 16
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
Exec-ing ninja when profitable? #212
Comments
Maybe it would be better (cross-platform) to handle these sorts of signals and just exit with the right error code instead of exposing the Python traceback? (Well, at least that would work on Unix...) |
Another option would be for the This wouldn't change the fact that when calling through the ninja module, the remark would still hold. But, at least, when using the installed script in the path, there wouldn't be any python overhead at all. |
And you’d need to duplicate the executable, I think, since the module can’t reliably locate the scripts install location. |
If we can rely on importlib.metadata (or importlib_metadata), the module can locate the script (that would mean no more support for python <2.7 & python < 3.5). |
As it currently stands, the
_program
function insrc/ninja/__init__.py
usessubprocess.call
.When used via the
ninja
main, it merely waits for the exit-code and then propagates it as its own.This is visible in that when this wrapper is Ctrl-C-ed, we see the interruption traceback in the Python interpreter.
In addition, a long-running Python process is parked without much remaining purpose.
I was wondering whether it would be a good idea to
exec
ninja instead of wrap it, when the platform supports it.What do you think?
The text was updated successfully, but these errors were encountered: