On Oct 1, 10:35 am, Antoine Pitrou <solip...@pitrou.net> wrote:
> On Thu, 30 Sep 2010 07:01:09 -0700 (PDT)
>
> Jean-Paul Calderone <exar...@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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to