|
|
|
@ -29,7 +29,13 @@ $original_stdin = $stdin.dup
|
|
|
|
|
$original_stdout = $stdout.dup |
|
|
|
|
$original_stderr = $stderr.dup |
|
|
|
|
|
|
|
|
|
control_socket_path = "/tmp/github-fast-envd.sock" |
|
|
|
|
$run_base_path = "/run/github-fast-env" |
|
|
|
|
|
|
|
|
|
unless File.directory?($run_base_path) |
|
|
|
|
FileUtils.mkdir_p($run_base_path, :mode => 0700) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
control_socket_path = "#{$run_base_path}/github-fast-envd.sock" |
|
|
|
|
|
|
|
|
|
if File.exist?(control_socket_path) and File.socket?(control_socket_path) |
|
|
|
|
File.unlink(control_socket_path) |
|
|
|
@ -87,7 +93,7 @@ def read_command(control_socket)
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def set_up_named_pipes(control_socket, connection_id) |
|
|
|
|
pipe_base_path = "/tmp/github-fast-envd.#{connection_id}" |
|
|
|
|
pipe_base_path = "/#{$run_base_path}/github-fast-envd.#{connection_id}" |
|
|
|
|
pipe_base_path_encoded = Base64.encode64(pipe_base_path).delete("\n") |
|
|
|
|
|
|
|
|
|
stdin = open_pipe("#{pipe_base_path}.stdin") |
|
|
|
|