Processes and their childs

2004-12-21 Thread Markus Franz
Hi! Inside a Python script (I use Python 2.4) several different child processes are created by using os.fork(). My problem: I want only the parent process to print some output and then create the child processes. But even If I use print BEFORE using os.fork, everything that was printed by the pa

Re: Processes and their childs

2004-12-21 Thread Jeff Epler
"flush" your files before forking. For me, this program gives the correct output 'hello\n' when correct=1. When correct=0, I get either 'hello\nhello' or 'hellohello\n' as output. correct = 0 import sys, os sys.stdout.writ