IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This makes it possible to use samba_runcmd_send() in processes like smbd
that install a SIGCHLD handler that reaps all terminated children.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This reverts commit 292e46ab12.
Processes run by tfork will have a parent pid of 1, they won't be childs
of the caller anymore.
When the source4 samba process uses samba_runcmd_send() to launch smbd
and winbindd the resulting process hierarchy becomes:
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
1 516 510 510 ? -1 S 111 0:02 avahi-daemon: running [samba-ad.local]
1 29209 29209 29209 ? -1 Ss 0 0:00 ./bin/samba
29209 29210 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29211 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29213 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29215 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29216 29209 29209 ? -1 R 0 0:00 \_ ./bin/samba
29209 29217 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29218 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29220 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29221 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29222 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29223 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29224 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
29209 29225 29209 29209 ? -1 S 0 0:00 \_ ./bin/samba
1 29214 29209 29209 ? -1 S 0 0:00 ./bin/samba
29214 29219 29219 29219 ? -1 Ss 0 0:00 \_ /home/slow/git/samba/scratch/bin/smbd -D --option=server role check:inhibit=yes --foreground
29219 29236 29219 29219 ? -1 S 0 0:00 \_ /home/slow/git/samba/scratch/bin/smbd -D --option=server role check:inhibit=yes --foreground
29219 29237 29219 29219 ? -1 S 0 0:00 \_ /home/slow/git/samba/scratch/bin/smbd -D --option=server role check:inhibit=yes --foreground
29219 29238 29219 29219 ? -1 S 0 0:00 \_ /home/slow/git/samba/scratch/bin/smbd -D --option=server role check:inhibit=yes --foreground
1 29228 29209 29209 ? -1 S 0 0:00 ./bin/samba
29228 29230 29230 29230 ? -1 Ss 0 0:00 \_ /home/slow/git/samba/scratch/bin/winbindd -D --option=server role check:inhibit=yes --foreground
29230 29239 29230 29230 ? -1 S 0 0:00 \_ /home/slow/git/samba/scratch/bin/winbindd -D --option=server role check:inhibit=yes --foreground
They will still be in the same process group and session, but just not
be a child or subchild. For childs of the source4 samba process this
might be non desirable.
killing all processes by sending a signal to the main samba process
still works, because a pipe is used between the samba process and the
smbd and winbindd childs. Both watch for EOF on the pipe.
In the output above smbd and winbindd are in their own process group ans
session because they call become_daemon().
See also the discussion in this mailthread:
<https://lists.samba.org/archive/samba-technical/2017-April/120257.html>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Apr 30 17:21:05 CEST 2017 on sn-devel-144
In contrast to source3, this is run as root and without substitution.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
We now print out a nasty message and set and error if we get ECHILD,
as we no longer set SIGIGN on SIGCHLD in the standard process model.
This was why samba_kcc was able to fail totally without us noticing.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 17 07:05:43 CET 2015 on sn-devel-104
In changing str_list_make to str_list_make_v3, the list can be NULL.
These are some additional checks to try to avoid any problems.
Where lists are dealt with, they typically check both if the list is
empty or the list is NULL.
Change-Id: I9012c31dbd9832ce877728bcb3346616ba64c4c5
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
this prevents a fd leak to child processes
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 22 14:00:06 CET 2011 on sn-devel-104
when we get ECHILD in samba_runcmd it is because the parent has set
SIGCHLD to SIG_IGN. In that case the child status information is
lost. We then have to fallback on the logging of child error messages
for any useful information on what happened to the child.
A longer term fix is to stop using SIG_IGN for SIGCHLD in the standard
process model of s4.
This allows us to run a child command in an async fashion, with
control over logging of stdout and stderr (which appears in the Samba
log file). This is useful for ensuring we don't miss important
messages from rndc commands (for example).
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>