- OS version and name: any
- Poetry version: 11.5
- Link of a Gist with the contents of your pyproject.toml file:
Issue
When running a program through poetry run, subprocess.call is used to execute the command. This has the negative side effect of causing poetry to swallow all signals, making it difficult to wrap commands that depend on signals to be handled properly.
I think the behavior that poetry run should have is that the command provided is exec'd using the exceve syscall, which will replace the process and allow signals to be handled properly. This is similar to the behavior of similar utilities, like bundle exec in ruby.
Poetry should play nice with other unix utilities.
Steps to reproduce
$ cd $(mktemp -d)
$ poetry init
$ go get -u github.com/ejholmes/sigp
$ sigp sleep 60 &
$ kill -TERM $!
signal 15 received (terminated)
signal 20 received (child exited)
$ poetry run sigp sleep 60 &
$ kill -TERM $! # notice that sigp doesn't print anything, because it didn't get the TERM signal
$ ps -A | grep sigp # zombie process now
18862 ttys013 0:00.01 sigp sleep 60
-vvvoption).Issue
When running a program through
poetry run,subprocess.callis used to execute the command. This has the negative side effect of causing poetry to swallow all signals, making it difficult to wrap commands that depend on signals to be handled properly.I think the behavior that
poetry runshould have is that the command provided isexec'd using theexcevesyscall, which will replace the process and allow signals to be handled properly. This is similar to the behavior of similar utilities, likebundle execin ruby.Poetry should play nice with other unix utilities.
Steps to reproduce