View difference between Paste ID: Ui0Rwmfn and YLaNBwvK
SHOW: | | - or go back to the newest paste.
1
import os
2
3
4
pid = os.fork()
5
if pid:
6
7
    print("parent")
8
    os.waitpid(pid, 0)
9
    
10
else:
11
12
    print("child")