Add comment about error pipe (mis)behavior
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
f9b2761d77
commit
1b6f23c8a9
@ -32,6 +32,12 @@ at_exit do
|
|||||||
# can be inconvenient for the user. But we need to be safe.
|
# can be inconvenient for the user. But we need to be safe.
|
||||||
system "/usr/bin/sudo -k"
|
system "/usr/bin/sudo -k"
|
||||||
|
|
||||||
|
# The main Homebrew process expects to eventually see EOF on the error
|
||||||
|
# pipe in FormulaInstaller#build. However, if any child process fails to
|
||||||
|
# terminate (i.e, fails to close the descriptor), this won't happen, and
|
||||||
|
# the installer will hang. Set close-on-exec to prevent this.
|
||||||
|
# Whether it is *wise* to launch daemons from formulae is a separate
|
||||||
|
# question altogether.
|
||||||
if ENV['HOMEBREW_ERROR_PIPE']
|
if ENV['HOMEBREW_ERROR_PIPE']
|
||||||
require 'fcntl'
|
require 'fcntl'
|
||||||
IO.new(ENV['HOMEBREW_ERROR_PIPE'].to_i, 'w').fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
IO.new(ENV['HOMEBREW_ERROR_PIPE'].to_i, 'w').fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user