Definitely will need to stew on this a while. Let's use the wiki: http://www.dbmail.org/dokuwiki/doku.php?id=daemonize
Aaron On Thu, 2006-03-16 at 16:45 -0800, Blake Mitchell wrote: > I like this the best of any set of daemon flags discussed so far. Very > clear, and usefully separated into chunks. FWIW, this gets my vote. > > Geo Carncross wrote: > .... > > > > Yeah, except note use you the word fork in defining detach. Better to > > say: > > > > -P: [pre]fork processes for handling children > > > > -D: detach from console by closing fds 0..93 inclusive after starting > > > > -B: put dbmail in the background (because for some reason you're > > starting dbmail from something that isn't a shell and you can't use &) > > > > -G: start dbmail in its own process group (setpgid) so that stupid > > programs (like pppd) don't kill it when a user disconnects- even more > > useful if someone starts it from a serial console and has a SAK > > > > -S: start dbmail in its own session (setsid)- implies -G, and requires > > -D (and the operations performed by -D must be done before setsid()) > > > > > > I'm not married to these switches- anything is fine, but there is > > something important about them: none of these definitions are negative; > > none of these switches "stop" dbmail from doing something. That's > > confusing. > > > > If the "default" should be something else, I recommend using a wrapper > > script as I described earlier. > > > .... > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev