Skip to content

Commit 5b5ad2f

Browse files
committed
use os.kill(pid, 0) for all the posix OS
Signed-off-by: Keming <kemingy94@gmail.com>
1 parent 4d55401 commit 5b5ad2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/profiling/sampling/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _print_unwinder_stats(self):
272272
def _is_process_running(pid):
273273
if pid <= 0:
274274
return False
275-
if sys.platform == "linux" or sys.platform == "darwin":
275+
if os.name == "posix":
276276
try:
277277
os.kill(pid, 0)
278278
return True

0 commit comments

Comments
 (0)