# Detaching a gserver

**URL:** <https://www.ruby-forum.com/t/detaching-a-gserver/143560>\
**Category:** Ruby\
**Created:** [July 20, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/detaching-a-gserver/143560 "2008-07-20T14:45:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enduro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@enduro](https://www.ruby-forum.com/u/enduro)\
**Post date:** [July 20, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/detaching-a-gserver/143560/1 "2008-07-20T14:45:17Z")

</div>

Hi there

I’m working on a policy server for Postfix and it works if used straight  
from the commandline: The process forks, mama sleeps and waits for  
SIGINT to stop the daemon.

Unfortunately, if I try to manage the service by an init-script with  
start-stop-daemon it silently dies. My guess is that something’s fishy  
with the way I use Process.detach or maybe I should take more care of  
STDIN, -OUT and -ERR.

Anybody knows of a project that uses the gserver class to build a daemon  
so I could peek how they do it, probably even with a start-stop-daemon  
example?

Thanks! -sven
