#!/usr/bin/python import sys, os, subprocess args = sys.argv[1:] if not args: raise SystemExit(1) pid = os.fork() if pid == 0: p = subprocess.Popen(args) rc = p.wait() raise SystemExit(rc)