Skip to content

Instantly share code, notes, and snippets.

@KangOl
Created November 30, 2012 09:35
Show Gist options
  • Save KangOl/4174755 to your computer and use it in GitHub Desktop.
Save KangOl/4174755 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
import sys
if len(sys.argv) > 1:
print os.getpid(), " ".join(sys.argv[1:])
else:
os.execv(sys.executable, [sys.executable] + sys.argv + ['hello', str(os.getpid())])
print os.getpid(), "end"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment