Created
November 24, 2013 00:47
-
-
Save lextoumbourou/7621938 to your computer and use it in GitHub Desktop.
This file contains 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 | |
from time import sleep | |
# Fork the process | |
pid = fork() | |
if pid == 0: # We're in the child process | |
print "Child process up in this." | |
else: # We're in the parent process | |
print "Parent here, I just created child", pid | |
# Sleep for a second to avoid being dropped back to the shell when the parent finishes | |
sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment