Python becoming orphaned over ssh
Jean-Paul Calderone
exarkun at twistedmatrix.com
Fri Oct 1 11:21:04 EDT 2010
On Oct 1, 10:35 am, Antoine Pitrou <solip... at pitrou.net> wrote:
> On Thu, 30 Sep 2010 07:01:09 -0700 (PDT)
>
> Jean-Paul Calderone <exar... at twistedmatrix.com> wrote:
>
> > But signal dispositions are inherited by child processes. So you run
> > ping from your short Python program, and it inherits SIGPIPE being
> > ignored. And it's written in C, not Python, so when it writes to the
> > pipe, there's no exception. So ping never gets any indication that it
> > should exit.
>
> But doesn't write() fail with EPIPE in that situation?
> That would mean `ping` ignores any error return from write().
>
Quite so. A quick look at ping.c from iputils confirms this - there
are many write() and fprintf() calls with no error handling.
Jean-Paul
More information about the Python-list
mailing list