diff --git a/Library/Homebrew/sandbox.rb b/Library/Homebrew/sandbox.rb index 81edb634e..c69a47d2b 100644 --- a/Library/Homebrew/sandbox.rb +++ b/Library/Homebrew/sandbox.rb @@ -102,6 +102,7 @@ class Sandbox begin command = [SANDBOX_EXEC, "-f", seatbelt.path, *args] + # Start sandbox in a pseudoterminal to prevent access of the parent terminal. T.unsafe(PTY).spawn(*command) do |r, w, pid| w.winsize = $stdout.winsize trap(:WINCH) { w.winsize = $stdout.winsize }