【问题标题】:Want to kill my tab but process.kill() doesn't work想杀死我的标签,但 process.kill() 不起作用
【发布时间】:2019-01-23 13:02:18
【问题描述】:

没有错误但仍然无法终止进程

import time
import subprocess
total_breaks = 3
break_count = 0
print("This program started on " + time.ctime())
while(break_count < total_breaks):
    time.sleep(5)
    process = subprocess.Popen([r'F:\software\firefox\Firefox.exe',
'-new-tab', 'http://www.google.com/'])
    time.sleep(6)
    process.kill()
    break_count = break_count + 1

我希望杀死我的标签,因为它没有显示错误但它不起作用。

【问题讨论】:

    标签: python kill-process taskkill


    【解决方案1】:

    重新打开后它会自动运行...我不知道为什么?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-26
      • 1970-01-01
      • 1970-01-01
      • 2016-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多