From: Jos Backus Date: 2006-06-21T10:15:09+09:00 Subject: Re: Ruby servers under daemontools (svc) On Tue, Jun 20, 2006 at 08:48:41AM +0900, James Moore wrote: > 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? 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). -- Jos Backus jos at catnook.com