I am trying out Samba4 beta 8 on FreeBSD. For Samba 3, I run smbd and nmbd with -D -F -S under the supervise utility from djb's daemontools. Stdout and stderr go to a logging utility and stdin comes from /dev/null. Running Samba 4 like this always terminates with "EOF on stdin". I can see from the source code that this is a feature so that the death of a parent process can be detected by generating EOF on a pipe. In my case I'm using supervise to control smbd/nmbd lifetime and would like to turn that off. Can an option to not check stdin when the foreground option is used be added?
Can you point me at some documentation (other than the daemontools source code) that tells me *exactly* what daemontools requires from a daemon it is managing ? In terms of backgrounding, process group control, low file descriptor handling etc. Without this it's going to be impossible to keep Samba under daemontools working in the long run. Jeremy.
Created attachment 8959 [details] git-am fix for master and 4.0.next. Please let me know if this fixes the issues for you. Jeremy.
Nice work thinking around the problem Jeremy!
OEM confirms this fixes their issue. I'll submit to master. Jeremy.
Already went into 4.1.0 and master (so has 2 team approval already). Re-assigning to Karolin for inclusion in 4.0.next. Jeremy.
(In reply to comment #5) > Already went into 4.1.0 and master (so has 2 team approval already). > > Re-assigning to Karolin for inclusion in 4.0.next. > > Jeremy. Patch does not apply on current v4-0-test (Fix bug #10097 - MacOSX 10.9...): user@host:/data/git/samba/v4-0-test$ git am 0001-Fix-bug-9166-Starting-smbd-or-nmbd-with-stdin-from-d.patch Applying: Fix bug #9166 - Starting smbd or nmbd with stdin from /dev/null results in "EOF on stdin" error: patch failed: source3/winbindd/winbindd.c:318 error: source3/winbindd/winbindd.c: patch does not apply Re-assigning to Jeremy.
Ok, I'm very confused. I just downloaded attachment: https://attachments.samba.org/attachment.cgi?id=8959 and did a : git am /tmp/0001-Fix-bug-9166-Starting-smbd-or-nmbd-with-stdin-from-d.patch and it applied cleanly to my branch: $ git branch * v4-0-test After the git am: $ git status # On branch v4-0-test # Your branch is ahead of 'origin/v4-0-test' by 1 commit. Am I trying to commit to the wrong branch here ? Is your branch clean ? Jeremy.
Certainly my fault, but I don't get it: user@host:/data/git/samba/v4-0-test$ git diff origin/v4-0-test user@host:/data/git/samba/v4-0-test$ cat ./.git/refs/heads/v4-0-test 16e6631da9385604f98a89a662a9b2d75affcd7c user@host:/data/git/samba/v4-0-test$ git branch * v4-0-test user@host:/data/git/samba/v4-0-test$ git am 0001-Fix-bug-9166-Starting-smbd-or-nmbd-with-stdin-from-d.patch Applying: Fix bug #9166 - Starting smbd or nmbd with stdin from /dev/null results in "EOF on stdin" error: patch failed: source3/winbindd/winbindd.c:318 error: source3/winbindd/winbindd.c: patch does not apply Patch failed at 0001 Fix bug #9166 - Starting smbd or nmbd with stdin from /dev/null results in "EOF on stdin" Your HEAD was also 16e6631da9? Karolin
Ok, here's the same on my machine: $ git diff origin/v4-0-test $ cat ./.git/refs/heads/v4-0-test 16e6631da9385604f98a89a662a9b2d75affcd7c $ git branch * v4-0-test $ git am /tmp/0001-Fix-bug-9166-Starting-smbd-or-nmbd-with-stdin-from-d\ \(1\).patch Applying: Fix bug #9166 - Starting smbd or nmbd with stdin from /dev/null results in "EOF on stdin" $ It just applies :-(. Can't see the difference.
(In reply to comment #9) > Ok, here's the same on my machine: > > $ git diff origin/v4-0-test > $ cat ./.git/refs/heads/v4-0-test > 16e6631da9385604f98a89a662a9b2d75affcd7c > $ git branch > * v4-0-test > $ git am /tmp/0001-Fix-bug-9166-Starting-smbd-or-nmbd-with-stdin-from-d\ > \(1\).patch > Applying: Fix bug #9166 - Starting smbd or nmbd with stdin from /dev/null > results in "EOF on stdin" > $ > > It just applies :-(. Can't see the difference. There seem to be differences between our git configs (strip whitespaces?). Your patch applies cleanly on my branch after cherry-picking aad669b53eca99 (s3: Fix some blank line endings). Thanks a lot to obnox for investigating!
Created attachment 9162 [details] Proposed patch for v4-0-test
Comment on attachment 9162 [details] Proposed patch for v4-0-test LGTM. Thanks for your patience on this one ! Jeremy.
(In reply to comment #12) > Comment on attachment 9162 [details] > Proposed patch for v4-0-test > > LGTM. Thanks for your patience on this one ! > > Jeremy. Pushed to autobuild-v4-0-test - halleluja! ;-)
Pushed to v4-0-test. Closing out bug report. Thanks!