Skip to content

Commit

Permalink
Windows doesn't support SIGQUIT
Browse files Browse the repository at this point in the history
  • Loading branch information
sj26 committed Aug 4, 2023
1 parent 7209b0f commit 3bdd831
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mail_catcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ def run! options=nil

# Make sure we quit nicely when asked
# We need to handle outside the trap context, hence the timer
%w(INT TERM QUIT).each do |signal|
trap(signal) { EM.add_timer(0) { quit! } }
end
trap("INT") { EM.add_timer(0) { quit! } }
trap("TERM") { EM.add_timer(0) { quit! } }
trap("QUIT") { EM.add_timer(0) { quit! } } unless windows?

# Open the web browser before detatching console
if options[:browse]
Expand Down

0 comments on commit 3bdd831

Please sign in to comment.