10 进程和多线程
10.1 多进程
# -*- coding: utf-8 -*-
import os
pid=os.fork()
print ('process (%s)start ...' %os.getpid())
if pid==0:
print('I am child process (%s) and my parent is %s.' % (os.getpid(), os.getppid()))
else:
print('I (%s) just created a child process (%s).' % (os.getpid(), pid))