Skip to content

Instantly share code, notes, and snippets.

@rohit-gupta
Last active August 29, 2015 14:15
Show Gist options
  • Save rohit-gupta/94cf4d290627a6d50577 to your computer and use it in GitHub Desktop.
Save rohit-gupta/94cf4d290627a6d50577 to your computer and use it in GitHub Desktop.
Launch process in background with STDOUT and pid logged to files, later using pid kill said process
python helloworld.py > helloworld.out & echo $! > helloworld.pid
cat helloworld.pid | xargs kill -9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment