On Mon, 2006-03-06 at 23:06 +0100, Paul J Stevens wrote: > Marc Dirix wrote: > > I think if you want to start the process in your special > > way, you could make an option for dbmail to not daemonize, and > > let the others use it like they are used to. There are a lott good > > daemons who have an console switch to not fork and kill tty. > > As does dbmail. dbmail-imapd -n won't fork and stay attached.
Right. dbmail is somewhat good in this respect. It's my opinion that it should be the default, and that daemonizing code doesn't belong in daemons. Below group #1 is preferred, #2 is acceptable (i.e. I can do what I want), #3 is tolorated (although wrong) and #4 makes me unhappy. I think there's loads of stuff to do besides daemonizing, and every time someone goes in there, it breaks it from #2 into #4 (as did happen). [1] Some examples of daemons that don't "daemonize": MySQL Qmail SpamAssassin (spamd) Courier/MTA [2] Examples of daemons that need a special flag/config file: ClamAV (clamd) Apache DBMail (-n) XNTPD [3] Examples of daemons that require a special flag used for something else (i.e. "debug mode"): OpenSSH [4] Examples of daemons that fork and detach like it or not: SSH PostgreSQL Postfix For me to run programs in group #4, I need a hack; like fghack which opens up a bunch of file descriptors to await EPIPE, or pgrphack which monitors a process group. This is just plain wrong. Daemons don't HAVE to daemonize themselves, and as a result they shouldn't. People that "expect them" have no reason to expect them to operate this way. They just use the supplied init script and be done with it. > But I guess Geo want's to be able to both fork and stay attached, > something currently not accomodated. Would be rather trivial though. No I don't. That's not what I want at all. I simply want to move dbmail into category #1 instead of category #2 so that people will _stop_ making programs that run in #3 or #4. I really need to work on my communication skills, don't I? :) -- Internet Connection High Quality Web Hosting http://www.internetconnection.net/
