trace.py and os.fork()
Here's a simple Python script:
import subprocess with open('hi.txt', 'w') as f: subprocess.Popen(['echo', 'Hello'], stdout=f).wait() Here's what it does:
$ python2.7 hi.py $ cat hi.txt Hello And here's what happens if you try to use the trace module to trace the execution:
$ python2.7 -m trace --trace hi.py (lots of trace output omitted) So far so good, but take a look at hi.txt: