with open(os.devnull, 'r+b', 0) as DEVNULL:
    p = Popen(['/usr/bin/python25', '/path/to/long_process.py'], stdin=
        DEVNULL, stdout=DEVNULL, stderr=STDOUT, close_fds=True)
time.sleep(1)
if p.poll():
    sys.exit(p.returncode)
Launch a completely independent process