Mike Pomraning added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to