Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
require 'ffi'
require 'jnr-enxio-0.1.jar'
module Open
extend FFI::Library
ffi_lib 'c'
attach_function :open, [:string, :int], :int
fd ='fifo', File::RDONLY | File::NONBLOCK)
channel =
io = channel.to_io
puts io.gets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.