' Fork pid = FORK IF pid = 0 THEN PRINT "I am the child, my PID is:", MYPID ENDFORK ELIF pid > 0 THEN PRINT "I am the parent, pid of child:", pid REPEAT PRINT "Waiting for child to exit" SLEEP 50 UNTIL REAP(pid) ELSE PRINT "Error in fork" ENDIF