Created
November 24, 2013 01:37
-
-
Save lextoumbourou/7622286 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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