classification
Title: Use flush() before os.exevp()
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, guettli
Priority: normal Keywords:

Created on 2006-10-18 08:04 by guettli, last changed 2008-09-28 00:17 by akuchling. This issue is now closed.

Messages (2)
msg61022 - (view) Author: Thomas Guettler (guettli) Date: 2006-10-18 08:04
Hi,

before using one of the os.exec??? functions you should
flush all open file descriptors. (E.g.
sys.stdout.flush()). If you don't the content in the
buffer will get lost.

According to Fredrik Lundh this is a feature, not a bug.

I think the documentation should include a hint:

""".... path must contain an appropriate absolute or
relative path.

****NEW
The current process gets replaces immediately. Open
file descriptors are not flushed. You should flush all
open file descriptors (e.g. sys.stdout.flush()) before
calling one if the above exec functions.
****
"""
msg73951 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-09-28 00:17
A paragraph has been added in rev. 66662, using
a modified version of your text.  Thanks for
your suggestion!
History
Date User Action Args
2008-09-28 00:17:26akuchlingsetstatus: open -> closed
resolution: fixed
messages: + msg73951
nosy: + akuchling
2006-10-18 08:04:31guettlicreate