dolphins7.skeleton/twenty-cli/lib/twenty/libexec.rb

13 lines
257 B
Ruby
Raw Normal View History

2023-12-07 14:19:53 +01:00
# frozen_string_literal: true
def spawn(exec, *argv)
libexec_dir = File.realpath(File.join(__dir__, "..", "..", "libexec", "twenty"))
Process.spawn File.join(libexec_dir, exec), *argv
end
def wait(pid)
Process.wait(pid)
rescue Interrupt
retry
end