Browse Source

Minor refactoring

master
Patrick Lühne 2 years ago
parent
commit
9f139a2147
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
  1. 6
      github-fast-env.rb
  2. 8
      github-fast-envd.rb

6
github-fast-env.rb

@ -126,11 +126,11 @@ while true
log "info", "connecting to named pipes at #{pipe_base_path}"
pipes["stdin"] = File::open("#{pipe_base_path}.stdin", "w")
pipes["stdin"] = File.open("#{pipe_base_path}.stdin", "w")
pipes["stdin"].sync = true
pipes["stdout"] = File::open("#{pipe_base_path}.stdout", "r")
pipes["stdout"] = File.open("#{pipe_base_path}.stdout", "r")
pipes["stdout"].sync = true
pipes["stderr"] = File::open("#{pipe_base_path}.stderr", "r")
pipes["stderr"] = File.open("#{pipe_base_path}.stderr", "r")
pipes["stderr"].sync = true
read_ios += [$stdin, pipes["stdout"], pipes["stderr"]]

8
github-fast-envd.rb

@ -98,11 +98,11 @@ def set_up_named_pipes(control_socket, connection_id)
control_socket.puts "named-pipes #{pipe_base_path_encoded}"
stdin = File::open(stdin, "r")
stdin = File.open(stdin, "r")
stdin.sync = true
stdout = File::open(stdout, "w")
stdout = File.open(stdout, "w")
stdout.sync = true
stderr = File::open(stderr, "w")
stderr = File.open(stderr, "w")
stderr.sync = true
$original_stderr.puts " set up named pipes"
@ -122,7 +122,7 @@ def set_up_named_pipes(control_socket, connection_id)
end
def set_up_pseudoterminal(control_socket, pseudoterminal_path)
pseudoterminal_io = File::open(pseudoterminal_path, File::RDWR | File::NOCTTY)
pseudoterminal_io = File.open(pseudoterminal_path, File::RDWR | File::NOCTTY)
$original_stderr.puts " connecting to pseudoterminal #{pseudoterminal_path}"

Loading…
Cancel
Save