# Daemon

**URL:** <https://rubytalk.org/t/daemon/261>\
**Category:** ruby-talk\
**Created:** [14 June 2002 14:23 UTC](https://rubytalk.org/t/daemon/261 "2002-06-14T14:23:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berger\_Daniel2](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@Berger\_Daniel2](https://rubytalk.org/u/Berger_Daniel2)\
**Post date:** [14 June 2002 14:23 UTC](https://rubytalk.org/t/daemon/261/1 "2002-06-14T14:23:02Z")

</div>

By daemon, do you simply mean that you want to run it in the background? If  
so, setsid() is the method you want (it’s a Kernel method).

Regards,

Dan

> **···**
>
> > -----Original Message-----  
> > From: Vivek Nallur [[mailto:nvivek@konark.ncst.ernet.in](mailto:nvivek@konark.ncst.ernet.in)]  
> > Sent: Friday, June 14, 2002 9:18 AM  
> > To: [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> > Subject: daemon
> > 
> > How do I make a script run as a deamon in ruby? I’m trying to create a  
> > variation on fetchmail and hence I want it to run in daemon mode, when  
> > invoked by root or so ‘optioned’
