Make sure all exceptions are sent back to the parent process

This commit is contained in:
Jack Nagel 2014-08-27 17:25:13 -05:00
parent 9386902cf8
commit 26467fa9d7

View File

@ -176,15 +176,15 @@ class Build
end end
end end
error_pipe = IO.new(ENV["HOMEBREW_ERROR_PIPE"].to_i, "w")
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
# Invalidate the current sudo timestamp in case a build script calls sudo
system "/usr/bin/sudo", "-k"
trap("INT", old_trap)
begin begin
error_pipe = IO.new(ENV["HOMEBREW_ERROR_PIPE"].to_i, "w")
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
# Invalidate the current sudo timestamp in case a build script calls sudo
system "/usr/bin/sudo", "-k"
trap("INT", old_trap)
formula = ARGV.formulae.first formula = ARGV.formulae.first
options = Options.create(ARGV.options_only) options = Options.create(ARGV.options_only)
build = Build.new(formula, options) build = Build.new(formula, options)