import os pid = os.fork() if pid < 0: print("Create process failed") elif pid == 0: print("The new process") else: print("The old process") print("Fork test over")
多任务编程 -- 基于fork的多进程编程
原文:https://www.cnblogs.com/gengyufei/p/12904349.html