Minor refactoring
This commit is contained in:
parent
878fe42672
commit
9f139a2147
@ -126,11 +126,11 @@ while true
|
|||||||
|
|
||||||
log "info", "connecting to named pipes at #{pipe_base_path}"
|
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["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["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
|
pipes["stderr"].sync = true
|
||||||
|
|
||||||
read_ios += [$stdin, pipes["stdout"], pipes["stderr"]]
|
read_ios += [$stdin, pipes["stdout"], pipes["stderr"]]
|
||||||
|
@ -98,11 +98,11 @@ def set_up_named_pipes(control_socket, connection_id)
|
|||||||
|
|
||||||
control_socket.puts "named-pipes #{pipe_base_path_encoded}"
|
control_socket.puts "named-pipes #{pipe_base_path_encoded}"
|
||||||
|
|
||||||
stdin = File::open(stdin, "r")
|
stdin = File.open(stdin, "r")
|
||||||
stdin.sync = true
|
stdin.sync = true
|
||||||
stdout = File::open(stdout, "w")
|
stdout = File.open(stdout, "w")
|
||||||
stdout.sync = true
|
stdout.sync = true
|
||||||
stderr = File::open(stderr, "w")
|
stderr = File.open(stderr, "w")
|
||||||
stderr.sync = true
|
stderr.sync = true
|
||||||
|
|
||||||
$original_stderr.puts " set up named pipes"
|
$original_stderr.puts " set up named pipes"
|
||||||
@ -122,7 +122,7 @@ def set_up_named_pipes(control_socket, connection_id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_up_pseudoterminal(control_socket, pseudoterminal_path)
|
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}"
|
$original_stderr.puts " connecting to pseudoterminal #{pseudoterminal_path}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user