Skip to content

Instantly share code, notes, and snippets.

@lextoumbourou
Created November 24, 2013 01:37
Show Gist options
  • Save lextoumbourou/7622286 to your computer and use it in GitHub Desktop.
Save lextoumbourou/7622286 to your computer and use it in GitHub Desktop.
from os import fork, getppid, wait
from sys import exit
from time import sleep
pid = fork()
if pid == 0:
exit("Goodbye, cruel world")
else:
print "I created a child:", pid
print "and now all I want to do is sleep..."
while True:
sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment