Re: stdout not flushed before os.execvp()

2006-10-18 Thread Fulvio
On Wednesday 18 October 2006 00:25, Fredrik Lundh wrote: > |feature. the "exec" system call operates on a lower level than the > |stdio buffering system. I did in this manner: for exe in ('imap4', 'pop3'): if exe in cfgfil[optsrv + '.protocol']: exe = exe[:4]; exe = 'cal

Re: stdout not flushed before os.execvp()

2006-10-17 Thread [EMAIL PROTECTED]
If you wanted to make sure stdio was flushed you could always do... sys.stdout.write("Message\n") sys.stdout.flush() Thomas Guettler wrote: > Hi, > > I noticed, that sys.stout does not get flushed before the process is > replaced. The last print statements (before execvp()) disappear. > > It only

Re: stdout not flushed before os.execvp()

2006-10-17 Thread Fredrik Lundh
Thomas Guettler wrote: > Is this a bug or feature? feature. the "exec" system call operates on a lower level than the stdio buffering system. -- http://mail.python.org/mailman/listinfo/python-list

stdout not flushed before os.execvp()

2006-10-17 Thread Thomas Guettler
Hi, I noticed, that sys.stout does not get flushed before the process is replaced. The last print statements (before execvp()) disappear. It only happens, if the output is redirected to a file (if sys.stdout is not line buffered). """#testexec.py import os print "Messsage" os.execvp("/bin/true",