[Top][All Lists]

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

Re: [Chicken-users] RFC: Daemonize

From: Ozzi
Subject: Re: [Chicken-users] RFC: Daemonize
Date: Fri, 30 Nov 2007 11:08:08 -0600
User-agent: Thunderbird (Macintosh/20071031)

Hans Bulfone wrote:

sorry for the late reply, i didn't have much time/energy for chicken
in the last few weeks :(

No problem, I'm in the same situtation.

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...

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.

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

afaik daemon() already calls fork() so i don't think you'd really
need to call (process-fork) then.
otoh - daemon() is like my (daemon:ize) function above, it terminates
the parent process which means your api would change and it would no
longer be directly possible to fork multiple independent daemon processes
from a single master.

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

Let me know what you think about merging daemon and syslog into posix, if you agree we should see what everyone else thinks and go from there.


reply via email to

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