> Perhaps the parent should open the pipe for reading, before calling > TroublesomeFunction. If the parent then dies, the child will get a "broken > pipe" signal, which by default should kill it.
Yeah, that seems to work well, I think. Thanks for the help! I also realised the child process was continuing and returning when I didn't really want it to. So for anyone else who stumbles across this, it ended up being pipename = os.tmpnam() os.mkfifo(pipename) pid = os.fork() if pid==0: fifoobj = open(pipename,"w") fifoobj.write(streamobj.read()) fifoobj.close() os.unlink(pipename) os._exit(os.EX_OK) else: fifoopen = open(pipename,"r") TroublesomeFunction(pipename) -- http://mail.python.org/mailman/listinfo/python-list