1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

selftest: Allow passing fork_and_exec()'s child_cleanup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Volker Lendecke 2020-01-30 16:06:48 +01:00 committed by Martin Schwenke
parent 154d7c8eaf
commit c779dfe70f

View File

@ -1387,6 +1387,7 @@ sub check_or_start($$) {
my $nmbd = $args{nmbd} // "no";
my $winbindd = $args{winbindd} // "no";
my $smbd = $args{smbd} // "no";
my $child_cleanup = $args{child_cleanup};
my $STDIN_READER;
@ -1415,7 +1416,8 @@ sub check_or_start($$) {
if ($nmbd ne "yes") {
$daemon_ctx->{SKIP_DAEMON} = 1;
}
my $pid = Samba::fork_and_exec($self, $env_vars, $daemon_ctx, $STDIN_READER);
my $pid = Samba::fork_and_exec(
$self, $env_vars, $daemon_ctx, $STDIN_READER, $child_cleanup);
$env_vars->{NMBD_TL_PID} = $pid;
write_pid($env_vars, "nmbd", $pid);
@ -1439,7 +1441,9 @@ sub check_or_start($$) {
if ($winbindd ne "yes") {
$daemon_ctx->{SKIP_DAEMON} = 1;
}
$pid = Samba::fork_and_exec($self, $env_vars, $daemon_ctx, $STDIN_READER);
$pid = Samba::fork_and_exec(
$self, $env_vars, $daemon_ctx, $STDIN_READER, $child_cleanup);
$env_vars->{WINBINDD_TL_PID} = $pid;
write_pid($env_vars, "winbindd", $pid);
@ -1461,7 +1465,8 @@ sub check_or_start($$) {
$daemon_ctx->{SKIP_DAEMON} = 1;
}
$pid = Samba::fork_and_exec($self, $env_vars, $daemon_ctx, $STDIN_READER);
$pid = Samba::fork_and_exec(
$self, $env_vars, $daemon_ctx, $STDIN_READER, $child_cleanup);
$env_vars->{SMBD_TL_PID} = $pid;
write_pid($env_vars, "smbd", $pid);