From: Luc Heinrich Date: 2009-01-19T21:05:46+09:00 Subject: Re: [FFI] how to bind to a function with variable number of args On 19 janv. 09, at 12:23, Ollivier Robert wrote: > UPDATE: setproctitle may not be available in OS X. Right. setproctitle is not available on OS X. > Retrying on FreeBSD leads > to this: > > /usr/local/lib/ruby/gems/1.8/gems/ffi-0.2.0/lib/ffi/types.rb:18:in > `find_type': Unable to resolve type 'stringproc.rb' (FFI::TypeError) Yes, and that's because I need some sleep ;) This is the right way to call variadic functions using FFI (remove the [ ]): LibC.setproctitle("Ruby: executing %s", :string, $0) Sorry about the wrong answers... :/ -- Luc Heinrich - luc@honk-honk.com