Message89218
One more possibly related bug is issue2320 where subprocesses are
spawned from multiple threads. They found an interesting workaround
that I found seems to help our problem too: "on Windows, if close_fds
is true then no handles will be inherited by the child process." So if
I change the subprocess.Popen lines in my most recently uploaded script
to:
rc = subprocess.Popen('cd.bat . > blah.txt', close_fds=True).wait()
rc = subprocess.Popen('del.bat blah.txt', close_fds=True).wait()
The rollover logging failure goes away. Does os.system have a similar
option? If not, then that would mean I'd have to convert all os.system
calls to subprocess.Popen and add the close_fds=True parameter to it.
The problem with this is that "Note that on Windows, you cannot set
close_fds to true and also redirect the standard handles by setting
stdin, stdout or stderr" and I am using both stdin and stdout on my
main subprocess.Popen call and I have a couple of os.system calls as
well. Thoughts? |
|
Date |
User |
Action |
Args |
2009-06-10 16:56:41 | rcronk | set | recipients:
+ rcronk, vinay.sajip, mramahi77, lowell87, neyro, Frans |
2009-06-10 16:56:41 | rcronk | set | messageid: <1244653001.69.0.946709618521.issue4749@psf.upfronthosting.co.za> |
2009-06-10 16:56:40 | rcronk | link | issue4749 messages |
2009-06-10 16:56:40 | rcronk | create | |
|