Hi, Yesterday (jan 24) I checked out Samba 2.2, because I'm trying to solve a problem involving oplock breaks. The compilation and installation went succesful, however I have a few questions. I use daemontools to run Samba. What daemontools does (simplified): - It starts a program. Whenever that program exits, the program is restarted after a one-second delay. - It sets up a pipe between the started program and a logger. The pipe is connected to stdout of the original program. This way, everything the program prints on stdout is sent to the logger. The problem with Samba 2.2.2 and earlier was that smbd and nmbd "auto-background". When smbd detaches itself, to daemontools it looks like smbd exited, and so daemontools starts another smbd, and so on. So I was happy to see a "-i" option included in smbd and nmbd. I tried to use them, but it didn't really work: * when smbd is invoked with the -i option, it only serves one request and then exits. * when smbd is invoked with the -i option, it still says "assuming -D". If -i would do the following, I would be very happy: * not auto-background, always keep running in the foreground * send all output and logging to stdout and/or stderr * on exiting, *do not kill* the entire process group -- Jurjen Oskam * http://www.stupendous.org/ for PGP key * Q265230 9:14am up 22 days, 14:20, 1 user, load average: 0.00, 0.00, 0.00
On Fri, 25 Jan 2002, Jurjen Oskam wrote:> So I was happy to see a "-i" option included in smbd and nmbd. I tried to > use them, but it didn't really work: > > * when smbd is invoked with the -i option, it only serves one request and > then exits. > > * when smbd is invoked with the -i option, it still says "assuming -D". > > > If -i would do the following, I would be very happy: > > * not auto-background, always keep running in the foreground > * send all output and logging to stdout and/or stderr > * on exiting, *do not kill* the entire process groupI'm looking into it.... chau, jerry --------------------------------------------------------------------- Hewlett-Packard http://www.hp.com SAMBA Team http://www.samba.org -- http://www.plainjoe.org "Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--
On Fri, 25 Jan 2002, Jurjen Oskam wrote:> So I was happy to see a "-i" option included in smbd and nmbd. I tried to > use them, but it didn't really work: > > * when smbd is invoked with the -i option, it only serves one request and > then exits. > > * when smbd is invoked with the -i option, it still says "assuming -D".I spoke with Jeremy and this is by design (for the -i switch at least). If this behavior does not work for the daemontools, we can make the it not exit after a single client connect and exit.
On Wed, Jan 30, 2002 at 11:52:58AM -0600, Gerald (Jerry) Carter wrote:> > * when smbd is invoked with the -i option, it only serves one request and > > then exits. > > > > * when smbd is invoked with the -i option, it still says "assuming -D". > > I spoke with Jeremy and this is by design (for the -i switch at > least). If this behavior does not work for the daemontools, > we can make the it not exit after a single client connect and exit.Oh yes please! That would be really nice. I find daemontools a *really* nice way to start, monitor and log services on a system. Automatically restarts services that exited (if you want that), easy and reliable signalling: no more finding out the PID of a process (*no* PID-files are necessary) and each time a service is started (either manually or automatically) it gets the same, clean, process state: environment variables, resource limits, controlling ttys, etc. If smbd and nmbd could be made to output all logging and errors to stdout and/or stderr and stay in the foreground, that would be *really* great. Thanks in advance! (Where can I send a pizza? :-) ) -- Jurjen Oskam * http://www.stupendous.org/ for PGP key * Q265230 9:18am up 28 days, 14:24, 1 user, load average: 0.08, 0.02, 0.01