调用os.fork()方法报错:AttributeError: module 'os' has no attribute 'fork'

错误栈:
Traceback (most recent call last):
File “D:/Users/qc/PycharmProjects/day20/duoxiancheng/duoxiancheng.py”, line 5, in
pid = os.fork()
AttributeError: module ‘os’ has no attribute ‘fork’

原因:windows系统中没有fork系统调用,调用os.fork就会报错,该方法在mac,linux,unix中可以使用

猜你喜欢

转载自blog.csdn.net/m0_37156322/article/details/81586899
今日推荐