# forkdemo.py -- demonstrates the use of os.fork()

# import the os module
import os

# print a status report 
print ("before the fork ... My pid is ",os.getpid())

# fork!
ret = os.fork()

#print("hi")
# print a status report 
if(ret==0):
	print ("... AFTER THE FORK: I am the CHILD.  My return value from os.fork() is ", ret, "and my process ID is ", os.getpid())
else:
	print ("... AFTER THE FORK:  I am the PARENT. My return value from os.fork() is ", ret, "and my process ID is ", os.getpid())

##################################################################################################################
