Subject:
[ruby-ffi] Troubles with Daemon Kit and FFI
From:
Arvicco
Date:
10/5/10 10:51 AM
To:
ruby-ffi

Hello all,

I'm having trouble to marry Daemon Kit and FFI under Cygwin (Yes,
daemons work well under Cygwin until I try to use FFI).

I've generated default daemon_kit skeleton and wrote simple proof-of-
concept daemon in libexec:
http://gist.github.com/611727

It just defines Win32 API function using FFI (vanilla FFI wiki
example) and then tries to call this function.

The trouble is, everything seems to work just fine when the daemon
binary is invoked with "my_daemon run" but when it is called with
"my_daemon start"(requesting daemonization), it just dies upon FFI
function call. Silently, without leaving any trace. No exceptions
(yes, I tried to catch them), nothing logged... it just disappears.

Did anyone try to use FFI like this? Am I missing something here? Any
help/tips would be greatly appreciated...

Regards,
Arvicco