[ = more output omitted the output of all of these processes shows up on the same screenbecause all of them share the standard output stream (and system prompt may show up along the waytootechnicallya forked process gets copy of the original process' global memoryincluding open file descriptors because of thatglobal objects like files start out with the same values in child processso all the processes here are tied to the same single stream but it' important to remember that global memory is copiednot sharedif child process changes global objectit changes only its own copy (as we'll seethis works differently in threadsthe topic of the next section the fork/exec combination in examples - and - child processes simply ran function within the python program and then exited on unix-like platformsforks are often the basis of starting independently running programs that are completely different from the program that performed the fork call for instanceexample - forks new processes until we type againbut child processes run brand-new program instead of calling function in the same file example - pp \system\processes\fork-exec py "starts programs until you type ' 'import os parm while trueparm + pid os fork(if pid = copy process os execlp('python''python''child py'str(parm)overlay program assert false'error starting programshouldn' return elseprint('child is'pidif input(=' 'break if you've done much unix developmentthe fork/exec combination will probably look familiar the main thing to notice is the os execlp call in this code in nutshellthis call replaces (overlaysthe program running in the current process with brand new program because of thatthe combination of os fork and os execlp means start new process and run new program in that process--in other wordslaunch new program in parallel with the original program parallel system tools