O
Ollivier Robert
I'm looking at ruby-ffi 0.2.0 with MRI 1.8.7 (haven't tried with
rubinius yet) and I can get to attach to setproctitle(3) defined like
this:
void
setproctitle(const char *fmt, ...);
-----
require "ffi"
#
module LibC
extend FFI::Library
attach_function :setproctitle, [:string, :string], []
end
LibC.setproctitle("Ruby: executing %s", $0)
----
gives
-----
FFI::NotFoundError: Function 'setproctitle' not found in [[current
process]]
from
/opt/local/lib/ruby/gems/1.8/gems/ffi-0.2.0/lib/ffi/library.rb:65:in
`attach_function'
rubinius yet) and I can get to attach to setproctitle(3) defined like
this:
void
setproctitle(const char *fmt, ...);
-----
require "ffi"
#
module LibC
extend FFI::Library
attach_function :setproctitle, [:string, :string], []
end
LibC.setproctitle("Ruby: executing %s", $0)
----
gives
-----
FFI::NotFoundError: Function 'setproctitle' not found in [[current
process]]
from
/opt/local/lib/ruby/gems/1.8/gems/ffi-0.2.0/lib/ffi/library.rb:65:in
`attach_function'