On Wed, Jun 3, 2015, at 09:08, Marko Rauhamaa wrote:
> random...@fastmail.us:
> 
> > Why does the child process need to report the error at all? The parent
> > process will find out naturally when *it* tries to close the same file
> > descriptor.
> 
> That's not how it goes.
> 
> File descriptors are reference counted in the Linux kernel. Closes are
> no-ops except for the last one that brings the reference count to zero.
> 
> If the parent should close the file before the child, no error is
> returned to the parent.

Why would the parent close it before the child? Your scenario doesn't
seem to have anything to do with how people actually use subprocesses.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to