Skip to content

Commit 1eac88d

Browse files
committed
Use portable terminate api for catch Ctrl+C
1 parent 6547d02 commit 1eac88d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sentry/process_runner.cr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ module Sentry
2323
@should_kill = false
2424
@app_built = false
2525

26-
Signal::INT.trap do
27-
@should_kill = true
26+
Process.on_terminate do |reason|
27+
case reason
28+
when .interrupted?
29+
@should_kill = true
30+
end
2831
end
2932

3033
{% if flag?(:linux) %}

0 commit comments

Comments
 (0)