标签:rom tip RoCE targe 进程id process art style def
from multiprocessing import Process
import time
import os
def run():
print(‘%s is runing,parent is <%s>‘%(os.getpid(), os.getppid()))
time.sleep(3)
print(‘%s is down, parent is <%s>‘%(os.getpid(), os.getppid()))
if __name__ ==‘__main__‘:
p = Process(target=run)
p.start()
print(‘主‘,os.getppid())
#os.getppid() 查看主进程的id
#os.getpid() 查看子进程的id
标签:rom tip RoCE targe 进程id process art style def
原文地址:https://www.cnblogs.com/yuexijun/p/11515055.html