Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
TTianshun committed Jan 7, 2024
1 parent 4342142 commit 072b4ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/viztracer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def wait_children_finish(self) -> None:
if pid_exists(pid):
break
else: # pragma: no cover
color_print("WARNING", f"Can't parse {viztmp_file}, skip")
color_print("WARNING", f"Unknown viztmp file {viztmp_file}")
else:
break
time.sleep(0.5)
Expand Down
4 changes: 2 additions & 2 deletions src/viztracer/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def pid_exists(pid):
# On Windows, 0 is an idle process buw we don't need to
# check it here
raise ValueError('invalid PID 0')
# Windows
if sys.platform == "win32":
# Windows
kernel32 = ctypes.windll.kernel32

process = kernel32.OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, 0, pid)
Expand Down Expand Up @@ -153,8 +153,8 @@ def pid_exists(pid):
# Usually it's impossible to run here in viztracer.
return True
return False # pragma: no cover
# UNIX
else:
# UNIX
try:
os.kill(pid, 0)
except OSError as err:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def target():
p.start()
# The main process will join the child in multiprocessing.process._children.
# This is a hack to make sure the main process won't join the child process,
# so we can test the wait_children_finish function
# so we can test the VizUI.wait_children_finish function
multiprocessing.process._children = set()
time.sleep(1)
"""
Expand All @@ -418,7 +418,7 @@ def target():
p.start()
# The main process will join the child in multiprocessing.process._children.
# This is a hack to make sure the main process won't join the child process,
# so we can test the wait_children_finish function
# so we can test the VizUI.wait_children_finish function
multiprocessing.process._children = set()
time.sleep(1)
"""
Expand Down

0 comments on commit 072b4ee

Please sign in to comment.