九色国产,午夜在线视频,新黄色网址,九九色综合,天天做夜夜做久久做狠狠,天天躁夜夜躁狠狠躁2021a,久久不卡一区二区三区

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
python

Your question is not too clear, but If I assume that you are about to launch a process wich goes to zombie and you want to be able to control that in some state of your script. If this in the case, I propose you the following:

p = subprocess.Popen([cmd_list], shell=False)

This in not really recommanded to pass through the shell.I would suggest you ti use shell=False, this way you risk less an overflow.

# Get the process id & try to terminate it gracefulypid = p.pid()p.terminate()# Check if the process has really terminated & force kill if not.try:    os.kill(pid, 0)    p.kill()    print "Forced kill"except OSError, e:    print "Terminated gracefully"
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
python 模塊psutil獲取進(jìn)程信息
python 判斷l(xiāng)inux進(jìn)程,并殺死進(jìn)程
在shell中模擬”Ctrl+...“的控制操作
Linux Shell腳本實(shí)現(xiàn)根據(jù)進(jìn)程名殺死進(jìn)程
使用 Python 實(shí)現(xiàn)多進(jìn)程
Python實(shí)現(xiàn)多進(jìn)程的四種方式!詳細(xì)介紹
更多類(lèi)似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服