smbd daemon mode

Esh, Andrew AEsh at
Tue Dec 4 14:32:06 GMT 2001

I wish I didn't have to bother the list with this, but are there some
special tricks to debugging smbd?

I see that the -D option puts smbd in daemon mode (which implies a fork),
but not supplying the -D also puts it in daemon mode. Apparently, stdin has
to be set up in some special way, because if it is not, smbd forces daemon

I also tried to live with daemon mode, and use the gdb setting
"follow-fork-mode". No matter what I set it to, it always follows the parent
fork. I was able to get strace to stay with the code with the "-f" option,
but strace follows both sides of the fork. gdb only follows ones side. I
single step through "sys_fork", and I always wind up right away at "exit".
I'm using "gdb 5.0rh-5 Red Hat Linux 7.1". smbd is dynamically linked, and
not stripped. gdb steps through source code and prints variables right up to
the point it exits, so the code has debug symbols.

Is there some tricky developer flag I have to flip somewhere to debug smbd,
or did someone put drugs in my coffee? Which is more likely?

Andrew C. Esh                mail:Andrew.Esh at
Tricord Systems, Inc.
2905 Northwest Blvd., Suite 20        763-557-9005 (main)
Plymouth, MN 55441-2644 USA      763-551-6418 (direct) - Tricord Home Page

-------------- next part --------------
HTML attachment scrubbed and removed

More information about the samba-technical mailing list