Class: Utils::ForkedChildChannel Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Bidirectional channel handed to a forked child whose parent passed
child_message_handler to safe_fork: request lines are written to the
error pipe and each response is read back from a second pipe.
Instance Method Summary collapse
- #close ⇒ void private
- #flush ⇒ void private
- #gets ⇒ String? private
- #initialize(error_pipe, response_pipe) ⇒ void constructor private
- #puts(message) ⇒ void private
Constructor Details
#initialize(error_pipe, response_pipe) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
13 14 15 16 |
# File 'utils/fork.rb', line 13 def initialize(error_pipe, response_pipe) @error_pipe = error_pipe @response_pipe = response_pipe end |
Instance Method Details
#close ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
34 35 36 37 |
# File 'utils/fork.rb', line 34 def close @error_pipe.close unless @error_pipe.closed? @response_pipe.close unless @response_pipe.closed? end |
#flush ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
24 25 26 |
# File 'utils/fork.rb', line 24 def flush @error_pipe.flush end |
#gets ⇒ String?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 |
# File 'utils/fork.rb', line 29 def gets @response_pipe.gets end |
#puts(message) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
19 20 21 |
# File 'utils/fork.rb', line 19 def puts() @error_pipe.puts end |