Samba 2.2.4 & daemontools

Ariel Mella samba at nebula-sa.com.ar
Tue May 14 05:12:03 GMT 2002


Michael:

what be the "pro" and "contra" to running smbd and nmbd under daemontools,
and not daemon the programs itself?



----- Original Message -----
From: "Michael Handler" <handler-list-samba-technical at grendel.net>
To: <samba-technical at lists.samba.org>
Sent: Tuesday, May 14, 2002 2:09 AM
Subject: Samba 2.2.4 & daemontools


> I'm trying to run smbd and nmbd under Dan Bernstein's supervise &
> svscan process control programs from his daemontools package
> (http://cr.yp.to/daemontools.html). Jos Backus has raised this issue
> in the past, re: the -i "interactive" flag and making smbd and nmbd
> create their own process groups, but unfortunately the -i flag isn't
> sufficient to make smbd run correctly under daemontools, as it makes
> smbd only answer the first connection comes in. Additionally, the
> -i flag forces smbd and nmbd to log to stdout, which may not be
> desireable in all situations.
>
> Attached please find a set of patches against Samba 2.2.4 to make
> the following changes:
>
> * smbd, nmbd, and winbindd now all have -S and -F options. The -S flag
>   means log to stdout. The -F flag makes the daemons run in the
>   foreground properly for use under daemontools, e.g. all operations
>   are normal, setsid(2) is called for process group creation, but the
>   fork(2)/exit pair and the closing of fd's 0, 1, and 2 (for rsh) are
>   skipped.
>
> * when setup_logging() selects stdout to write all logs to, it sets
>   that filedescriptor to "unbuffered" to ensure that logs are written out
>   promptly, especially under multilog (from daemontools).
>
> Samba team members, if this code and changes are acceptable to you,
> I would appreciate being told what work I need to do in order to
> ensure that this functionality is rolled forward into Samba 3.0 and
> forward, and what documentation patches I should submit for both
> 2.0 and 3.0.
>
> If this code or changes are unacceptable for any reason, please don't
> hesitate to let me know so we can begin a dialogue about the proper way
> to implement this functionality into Samba.
>
> Thank you all very much for your excellent work on Samba over the years.
>
> --michael
>
> --
> handler at grendel.net (michael handler)
washington, dc
>





More information about the samba-technical mailing list