Skip to content

Commit 70ddc00

Browse files
authored
python: py-spy: Use SIGKILL to stop it (#180)
See py-spy commit benfred/py-spy@290584d, SIGINT just raises a flag telling it to stop (makes sense, since it still dumps output etc). But if py-spy is stuck for whatever reason, it won't be stopped by this signal. SIGKILL is not handled by py-spy, duh, so it will exit immediately.
1 parent 07f2b60 commit 70ddc00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gprofiler/profilers/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _profile_process(self, process: Process) -> Optional[StackToSampleCount]:
7171
self._make_command(process.pid, local_output_path),
7272
stop_event=self._stop_event,
7373
timeout=self._duration + self._EXTRA_TIMEOUT,
74-
kill_signal=signal.SIGINT,
74+
kill_signal=signal.SIGKILL,
7575
)
7676
except ProcessStoppedException:
7777
raise StopEventSetException

0 commit comments

Comments
 (0)