Method: RunLoop::Core.create_uia_pipe
- Defined in:
- lib/run_loop/core.rb
.create_uia_pipe(repl_path) ⇒ Object
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/run_loop/core.rb', line 354 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 => _ sleep(0.1) end end end rescue RunLoop::TimeoutError => _ raise RunLoop::TimeoutError, 'Unable to create pipe (mkfifo failed)' end end |