Skip to content

Commit

Permalink
Allow to cancel do_cancel processes triggered by signals
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Mar 27, 2015
1 parent 07a005e commit de084e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/droonga-engine-absorb-data
Expand Up @@ -232,18 +232,18 @@ class AbsorbDataCommand

def trap_signals
trap(:TERM) do
do_cancel
trap(:TERM, "DEFAULT")
do_cancel
end

trap(:INT) do
do_cancel
trap(:INT, "DEFAULT")
do_cancel
end

trap(:QUIT) do
do_cancel
trap(:QUIT, "DEFAULT")
do_cancel
end
end

Expand Down
6 changes: 3 additions & 3 deletions bin/droonga-engine-join
Expand Up @@ -267,18 +267,18 @@ class JoinCommand

def trap_signals
trap(:TERM) do
do_cancel
trap(:TERM, "DEFAULT")
do_cancel
end

trap(:INT) do
do_cancel
trap(:INT, "DEFAULT")
do_cancel
end

trap(:QUIT) do
do_cancel
trap(:QUIT, "DEFAULT")
do_cancel
end
end

Expand Down

0 comments on commit de084e0

Please sign in to comment.