Killing a script launched in a Process via os.system()

前端 未结 4 650
旧时难觅i
旧时难觅i 2021-01-13 02:35

I have a python script which launches several processes. Each process basically just calls a shell script:

from multiprocessing import Process
import os
imp         


        
4条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 03:12

    Use subprocess instead, whose objects have a terminate() method explicitly for this.

提交回复
热议问题