On Wed, 2006-03-15 at 18:36 -0500, Geo Carncross wrote: > On Wed, 2006-03-15 at 14:30 -0800, Blake Mitchell wrote: > > Geo, I think you are confusing your forks. You are thinking fork as in > > run in the background by forking and then killing the parent. Where as > > Aaron is talking about forking child processes to handle each connection. > > If that's the case, then fine.
Right -- What I mean by fork and detach are: fork: children to handle connections. detach: double fork away from console. the -f option is already taken for alt. config file; that option runs across all of the command line programs and would be hard to change, needing to rearrange other options to make room in some cases. It would kinda neat if you ran 'dbmail-imapd' and the program returned "Dbmail-IMAPd ready to rock" and started speaking IMAP to you ;-) I'm not sure if I like this, though. I'll marinate with it some more. It might also be time to start using getopt_long... > > Geo Carncross wrote: > > > On Wed, 2006-03-15 at 09:19 +0100, Paul J Stevens wrote: > > >> Aaron Stone wrote: > > >>> If we don't want to break existing scripts/installations: > > >>> > > >>> default: fork, detach. > > >>> -n: no-fork, no-detach. > > >>> (new) -d, fork, no-detach. > > >>> Weirdness: -nd means what? same as -n? > > >>> > > >>> However I would rather break things sooner than later: > > >> agreed. > > >> > > >>> default: fork, no-detach > > >>> -n: no-fork, no-detach > > >>> (new) -d: fork, detach > > >>> -nd: no-fork, detach (unsupported, but could be) > > >>> > > >>> I think this would give us the best set of options that make sense. > > >> Ok by me. > > > > > > I'd recommend: > > > > > > default: no-fork, no-detach > > > -d: detach > > > -f: fork > > > > > > -d would simply be a synonym for >&- <&- 2>&- (etc) > > > -f would simply be a synonym for & > > > > > > possible other options: > > > -g would set up a new process group > > > -e would set up a new session > > > > > > That way, people using init.d might try: > > > > > > dbmail -defg > > > > > > people using /etc/rc would use: > > > > > > dbmail -df > > > > > > and people using /etc/inittab or daemontools would use: > > > > > > dbmail > > > > > > > > > ALTHOUGH, really- I think "dbmail" should be called "dbmail-start" and > > > live in libexec someplace and /usr/sbin/dbmail should instead be a > > > wrapper script that looks like this: > > > > > > #!/bin/sh > > > exec /usr/libexec/dbmail/dbmail-start -defg > > > > > > > > > > > _______________________________________________ > > Dbmail-dev mailing list > > [email protected] > > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
