ninja-python-distributions icon indicating copy to clipboard operation
ninja-python-distributions copied to clipboard

Exec-ing ninja when profitable?

Open nextsilicon-itay-bookstein opened this issue 9 months ago • 4 comments

As it currently stands, the _program function in src/ninja/__init__.py uses subprocess.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?