[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] RFC: Daemonize

From: Hans Bulfone
Subject: Re: [Chicken-users] RFC: Daemonize
Date: Fri, 30 Nov 2007 19:37:14 +0100
User-agent: Mutt/1.5.16 (2007-06-09)


On Fri, Nov 30, 2007 at 11:08:08AM -0600, Ozzi wrote:

>> i also wanted to create an egg from that code, along with some
>> syslog functions, but was to lazy to do it as yet :)
>> perhaps we should merge our code...

as i now have more than one daemon i created an egg from my code
yesterday, named daemon-tools.
(this doesn't mean we can't still move things around of course)

> Actually, I think there's three eggs here.
> Syslog: The syslog functions.
> Daemon: Mostly a clone of C's or Perl's daemon() function. Could be a 
> wrapper to the C function.
> Daemonize: A more robust daemonization function/library that can take care 
> of PID files, output redirection to log files, and anything else related to 
> managing a daemon. It may include functionality from Syslog, if appropriate 
> (I'm not sure right now). It should probably be named something other than 
> Daemonize, though.

at least the syslog and daemon parts are rather small and don't have any
dependencies beside chicken itself, so i'm not sure if it's worth separating
them into multiple eggs.

> The Syslog and Daemon eggs might be best off merged into the Posix unit.

yes, you may be right, but on the other hand having them as separate egg
has at least the advantage that apps that use them don't need to depend on
the latest chicken version.

also it seems to me that the "trend" at the moment is rather to move things
out of the chicken core into separate eggs (like easyffi, dollar, etc.)
which imho is a good thing.

when the functions are included in chicken itself there probably also
should be an implementation for windows, where they most likely
won't work as-is... (which would of course also be good for the separate
egg case, any volunteers? :)

> Indeed, it may be appropriate to have different functions for daemonizing 
> the current processing and forking a new daemon process.

yes - or just do
(process-fork (cut daemonize-current-process pid-file: "/" user: "foo" 
when one wants to create multiple daemons.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]