forking and execing in python (could probably be better, i did it in the most C-like way)
public python v1 · immutableimport ospid = os.fork()if pid > 0: # we are the parent! pid is nowthe pid of the child os.waitpid(pid,0) #wait for our child - could simply use wait() print "it's done"elif pid == 0: # we are the child, time to exec os.execvp("grep",("date","pid","fork.py")) # note that execvp uses the path, ymmv here