I'm having a problem with subprocess .wait() on my G4 Mac running the universal Python 2.4.3. If I do a .wait() call immediately after creating the process object (on a very heavily loaded machine), an "interrupted system call" exception is raised pointing at the .wait() line. I discovered that if I insert a sleep(1) between the Popen and wait, my command runs as expected. (The command is a rather large mimetex[1] executable that I compiled as a universal binary.)
If I just run the Python program fragment, it runs fine without the sleep... and I've yet to find a minimal case that triggers the behavior I'm seeing. Does anyone happen to have a clue what my larger program might be doing that seems to trigger this race-like behavior of Popen and wait? Or am I misusing Popen() and .wait()? from subprocess import Popen, PIPE cmd = '/usr/local/bin/mimetex' process = Popen([cmd, '-d', latex, '-s', str(int(fontsize)-1)], bufsize=8092, stdout=PIPE, stderr=PIPE) #time.sleep(1) returnCode = process.wait() [1] http://www.forkosh.com/mimetex.html -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/crew/jwt/ Mailman IRC irc://irc.freenode.net/#mailman _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig