From ff11789933c45d9897072af913ae1478f5dc26db Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 12 May 2015 21:52:30 -0400 Subject: Close the socket after sending the file descriptor to the child Fixes Homebrew/homebrew#39691. --- Library/Homebrew/utils/fork.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'Library') diff --git a/Library/Homebrew/utils/fork.rb b/Library/Homebrew/utils/fork.rb index 24b78e5dd..5c364713b 100644 --- a/Library/Homebrew/utils/fork.rb +++ b/Library/Homebrew/utils/fork.rb @@ -30,6 +30,7 @@ module Utils retry unless Process.waitpid(pid, Process::WNOHANG) else socket.send_io(write) + socket.close end write.close data = read.read -- cgit v1.2.3