daemontools patches for SAMBA 2.2.7a and HEAD

Michael Handler handler-list-samba-technical at grendel.net
Mon Dec 23 01:47:00 GMT 2002

Jelmer Vernooij <jelmer at samba.org> writes:

> Just curious: Why not just use -i and -l - ?

-i is insufficient because it appears to be a debugging mode only;
if you specify -i, smbd doesn't fork off children to handle incoming
requests, and it only accepts and handles one connection before
terminating. see line 279 in open_sockets() in smbd/server.c. rather
than modify the behavior of -i to be what i need, i left it as is
and added the correct mode for daemontools.

as for "-l -":

                case 'l':
                        specified_logfile = True;
                        slprintf(logfile, sizeof(logfile)-1, "%s/log.smbd", opta

my reading of that code says it tries to log to -/log.smbd, which
is not standard output. :) (-i automatically logs to standard output,

also: the decoupling of logging to standard output and running under
daemontools is deliberate. some people use svscan and supervise,
but still want to log to syslog rather than using multilog, and i
see no reason not to support that. thus, just modifying the behavior
of -i is suboptimal, because it automatically logs to standard output,
and can't be overridden.

More information about the samba-technical mailing list