Ruby servers under daemontools (svc)

I’m using ruby processes run under daemontools (on linux), and I’m not
sure
what’s going on with signals.

Playing with a very simple ruby “server”:

Signal.trap(“CONT”) { abort }
while(1) do
$stderr << “errslp\n”
$stdout << “outslp\n”
end

When I try to use svc commands (-d, -h) the process being monitored is
running, but it’s PPID is set to 1 (init) and service has started a new
process.

Just using kill to send SIGHUP does what I’d expect (the process dies
and
service restarts a new one).

Suggestions? Anyone else running ruby processes under daemontools?

  • James M.

On Tue, Jun 20, 2006 at 08:48:41AM +0900, James M. wrote:

When I try to use svc commands (-d, -h) the process being monitored is
running, but it’s PPID is set to 1 (init) and service has started a new
process.

Just using kill to send SIGHUP does what I’d expect (the process dies and
service restarts a new one).

Suggestions? Anyone else running ruby processes under daemontools?

What does your run file look like? And what does readproctitle show, if
anything?

When I stick the above in a file and prepend `#!/usr/bin/env ruby’ and
make it
executable it works fine (on FreeBSD).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs