mirror of
https://github.com/YosysHQ/sby.git
synced 2025-11-03 06:17:52 +00:00
minor fixes after testing
This commit is contained in:
parent
20ec63899a
commit
daa8329baa
1 changed files with 4 additions and 4 deletions
|
|
@ -61,7 +61,7 @@ def _create_process_lookup():
|
||||||
pe = pointer(PROCESSENTRY32())
|
pe = pointer(PROCESSENTRY32())
|
||||||
pe.contents.dwSize = sizeof(PROCESSENTRY32)
|
pe.contents.dwSize = sizeof(PROCESSENTRY32)
|
||||||
pid_lookup = {}
|
pid_lookup = {}
|
||||||
if windll.kernel32. (handle, pe) != 0:
|
if windll.kernel32.Process32First(handle, pe) != 0:
|
||||||
_update_lookup(pid_lookup, pe)
|
_update_lookup(pid_lookup, pe)
|
||||||
while windll.kernel32.Process32Next(handle, pe) != 0:
|
while windll.kernel32.Process32Next(handle, pe) != 0:
|
||||||
_update_lookup(pid_lookup, pe)
|
_update_lookup(pid_lookup, pe)
|
||||||
|
|
@ -83,6 +83,6 @@ def win_killpg(pid):
|
||||||
try:
|
try:
|
||||||
# "Any other value for sig will cause the process to be
|
# "Any other value for sig will cause the process to be
|
||||||
# unconditionally killed by the TerminateProcess API"
|
# unconditionally killed by the TerminateProcess API"
|
||||||
os.kill(p, sig=-1)
|
os.kill(p, -1)
|
||||||
except PermissionError as pe:
|
except (PermissionError, OSError) as e:
|
||||||
print("WARNING: error while killing pid {}: {}".format(p, pe))
|
print("WARNING: error while killing pid {}: {}".format(p, e))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue