1 2 3 4 5 6 7 8
import subprocess def foo(): pass subprocess.Popen(preexec_fn=foo) # [subprocess-popen-preexec-fn]