Method: RunLoop::Core.create_uia_pipe
- Defined in:
- lib/run_loop/core.rb
.create_uia_pipe(repl_path) ⇒ Object
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/run_loop/core.rb', line 550 def self.create_uia_pipe(repl_path) begin Timeout::timeout(5, RunLoop::TimeoutError) do loop do begin FileUtils.rm_f(repl_path) return repl_path if system(%Q[mkfifo "#{repl_path}"]) rescue Errno::EINTR => e #retry sleep(0.1) end end end rescue RunLoop::TimeoutError => _ raise RunLoop::TimeoutError, 'Unable to create pipe (mkfifo failed)' end end |