Message263302
Yes, standard UNIX terminal behavior is to map Ctrl-C to a SIGINT sent to the foreground process group, so that every member of a pipeline (e.g.) or hidden helper children processes can be terminated by the interactive user and have the chance to clean up.
Handling a child process behind a convenience interface, like system() or subprocess.call(), is inherently a bit tricky when things go wrong.
My expectation for .call() would be that it behave something like os.system() (or the C library system() for that matter) and _not_ be interrupted by conventional signals. That the EINTR be "swallowed" and the p.wait() resumed, as _try_wait() does already. That way a user timeout= does what we want, but a Ctrl-C has familiar semantics.
Yes, it will be possible for a coder to contrive to throw some other exception during the wait() ... in that case we should close the pipes but _not_ kill and reap the child. There will be zombies. Zombies are better than SIGKILLing a 3rd-party process that perhaps needs a graceful shutdown. |
|
Date |
User |
Action |
Args |
2016-04-13 03:26:42 | Mike Pomraning | set | recipients:
+ Mike Pomraning, vstinner, SilentGhost, martin.panter, rpcope1 |
2016-04-13 03:26:41 | Mike Pomraning | set | messageid: <1460518001.88.0.119635374302.issue25942@psf.upfronthosting.co.za> |
2016-04-13 03:26:41 | Mike Pomraning | link | issue25942 messages |
2016-04-13 03:26:41 | Mike Pomraning | create | |
|