Skip to content

Commit 1a39090

Browse files
committed
Use Thread when toggling vernier from signal
This should avoid issues with actions which aren't allowed in signal contexts.
1 parent eaa352f commit 1a39090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vernier/autorun.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def self.toggle
5858
if signal = Vernier::Autorun.options[:signal]
5959
STDERR.puts "to toggle profiler: kill -#{signal} #{Process.pid}"
6060
trap(signal) do
61-
Vernier::Autorun.toggle
61+
Thread.new { Vernier::Autorun.toggle }
6262
end
6363
end
6464

0 commit comments

Comments
 (0)