Skip to content

Commit

Permalink
Merge pull request sass#774 from xzyfer/trash/bad-signals
Browse files Browse the repository at this point in the history
Fix `Errno::EINVAL` errors on timeout
  • Loading branch information
xzyfer committed Apr 18, 2016
2 parents 02b7381 + eac4117 commit cab24e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sass_spec/capture_with_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def capture3_with_timeout(*cmd)
:stdin_data => spawn_opts.delete(:stdin_data) || "",
:binmode => spawn_opts.delete(:binmode) || false,
:timeout => spawn_opts.delete(:timeout),
:signal => spawn_opts.delete(:signal) || :TERM,
:signal => spawn_opts.delete(:signal) || "TERM",
:kill_after => spawn_opts.delete(:kill_after),
}

Expand Down Expand Up @@ -94,7 +94,7 @@ def capture3_with_timeout(*cmd)
Process.kill(opts[:signal], pid)
if opts[:kill_after]
unless wait_thr.join(opts[:kill_after])
Process.kill(:KILL, pid)
Process.kill("KILL", pid)
end
end
ensure
Expand Down

0 comments on commit cab24e9

Please sign in to comment.