Minor refactoring

This commit is contained in:
Patrick Lühne 2020-05-26 02:59:58 +02:00
parent 878fe42672
commit 9f139a2147
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 7 additions and 7 deletions

View File

@ -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"]]

View File

@ -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}"