[Samba] Option configure

Steve Litt slitt at troubleshooters.com
Wed Jul 13 21:21:21 UTC 2016


On Tue, 12 Jul 2016 14:53:39 -0400
Sonic <sonicsmith at gmail.com> wrote:

> On Tue, Jul 12, 2016 at 10:09 AM, Sonic <sonicsmith at gmail.com> wrote:
> > Mine use Type=forking, I had some issues with Type=notify  
> 
> Further testing seems to verify that either type works for starting
> nmbd and smbd, but I need forking for starting samba (AD) as samba
> dies shortly after starting it with notify.
> 
> From some systemd info:
> "If set to forking, it is expected that the process configured with
> ExecStart= will call fork() as part of its start-up. The parent
> process is expected to exit when start-up is complete and all
> communication channels are set up. The child continues to run as the
> main daemon process. This is the behavior of traditional UNIX
> daemons."
> I'm guessing that indeed the samba binary calls fork() as part of its
> start-up. Can this be verified? And how about the smbd and nmbd
> binaries, do they call fork() during stat-up?
> 
> Chris

Hi Chris,

I don't use systemd, but what I recommend to my systemd friends when
they run into this sort of problem is to start up daemontools-encore
from systemd, and start up Samba (using the -F for foreground) from
daemontools-encore. That way you get the benefit of systemd (there must
be SOME benefit or you'd be using Runit, OpenRC or sysvinit), yet you
have the easily examined startup and supervision of daemontools-encore.

Everything I just said about daemontools-encore can also be said of
both Runit and S6.

HTH,

SteveT

Steve Litt 
July 2016 featured book: Troubleshooting Techniques
     of the Successful Technologist
http://www.troubleshooters.com/techniques



More information about the samba mailing list