process_usage.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:base_function 作者: Rockyzsu 项目源码 文件源码
def fork_case():
    #can't work under windows
    print "Process %s start " %os.getpid()
    pid=os.fork()

    if pid==0:
        print "i am child process %s. and my parent pid is %s " %(os.getpid(),os.getppid())
    else:
        print "i am parent process %s, and create my child process %s" %(os.getpid(),pid)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号