fork/exec & close file descriptors

random832 at fastmail.us random832 at fastmail.us
Wed Jun 3 08:54:10 EDT 2015


On Wed, Jun 3, 2015, at 08:25, Marko Rauhamaa wrote:
> Steven D'Aprano <steve at pearwood.info>:
> 
> > How does the child process know what action didn't complete? What
> > error message are you going to display to the user?
> 
> You definitely must not use sys.stderr from the child process nor are
> you allowed to exit through an exception but must call os._exit()
> instead.

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.



More information about the Python-list mailing list