-Chấm dứt tiến trình con trong Windows, access denied
import time
import subprocess
from os.path import expanduser
chrome_path = expanduser('~\Local Settings\Application Data\Google\Chrome\Application\chrome.exe')
proc = subprocess.Popen(chrome_path)
time.sleep(4)
proc.terminate()
Output: WindowsError: [Error 5] Access is denied
Làm thế nào tôi có thể giết chết quá trình Chrome?
Python 2.6 trên Windows XP.
Tôi không thể sao chép sự cố của bạn. Tôi đang sử dụng Python 2.6.6 và 6.0.472.63 trên Windows 7, nhưng quá trình này bị giết rất tốt. – jsalonen
Đoán nó chỉ là một vấn đề XP sau đó. Tôi đã thêm thông tin phiên bản vào câu hỏi. –