Feature #150

True daemon mode on Unix

Added by Ruben Lopez over 7 years ago. Updated over 7 years ago.

Status:NewStart date:09/23/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:all
Target version:0.64.6

Description

For the master and slave to properly work as daemons on Unix, the processes need to call "daemon()" to detach themselves from the terminal. This is a must to include the master and slave in startup (init.d) scripts (related ticket: #29).

I attach a patch that adds a new commandline option (-d) that enables this daemon() call. It was tested here at Bren Entertainment with our custom init.d scripts and is working right.

daemon.patch Magnifier - daemon patch made with git (4.52 KB) Ruben Lopez, 09/23/2010 12:58 pm

History

#1 Updated by Andreas Schröder over 7 years ago

  • Priority changed from High to Normal
  • Target version set to 0.64.6

The daemon() function is only available on unix-like systems. For Windows, another solution has to be worked out.

By the way, Gentoo uses the start-stop-daemon tool to make a daemon functionality possible. See http://bugs.gentoo.org/attachment.cgi?id=128205 for an example.

#2 Updated by Ruben Lopez over 7 years ago

I am afraid that this utility is not available for Fedora systems. There is a "daemon" script function for init.d scripts, but it doesn't work if the process that is started doesn't detach itself from the terminal (ie. calling libc's daemon() )

Also available in: Atom PDF