Nun können wir auch unser test.sh als eigenständigen Prozess durch ein fork() starten:
import os, sys
while True:
pid = os.fork()
if pid == 0:
args = ("test","abc")
os.execv('/home/bernd/bin2/test.sh', args)
assert False, 'error starting program'
else:
print 'ProcessID of Child:', pid
if raw_input( ) == 'q': break