[issue16635] Interpreter not closing stdout/stderr on exit

2013-08-02 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: > If stdout was closed before closing stderr, then stdout problems > could be reported, and that is what I would expect when using Python > this way. To be consistent, we should also close stderr, and then we couldn't report any subsequent error. > os.

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Filip Zyzniewski
Filip Zyzniewski added the comment: If stdout was closed before closing stderr, then stdout problems could be reported, and that is what I would expect when using Python this way. os.fsync(1) helps, but only if preceeded by sys.stdout.flush() and it seems a bit cumbersome. Is there any downsi

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: stdout and stderr are not closed, because in 99.% of cases it's useless: they are closed upon the program exit. Also, imagine what would happend if an error occured after closing them, we would be unable to log it. If you want to avoid this kind o

[issue16635] Interpreter not closing stdout/stderr on exit

2012-12-07 Thread Filip Zyzniewski
New submission from Filip Zyzniewski: When using a Python script as a unix pipe filter with its stdout redirected to a file: python script.py > /nfs/foo user is not notified of some writing problems on NFS, because these are sometimes reported on close(), and the interpreter never does neithe