The branch, master has been updated via fa06617 s3:winbindd: remove unused get[pw|gr]ent_initialized from winbindd_cli_state via b280395 selftest: teardown the environments also on getting SIGPIPE from a6523d7 s3:smb2_negprot: change "smb max {read,write,trans}" to 8MiB (as default)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit fa066178868c7437b1b7e84abe3b545e53983c8f Author: Stefan Metzmacher <me...@samba.org> Date: Mon Jul 7 15:12:37 2014 +0200 s3:winbindd: remove unused get[pw|gr]ent_initialized from winbindd_cli_state Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Fri Jul 11 18:46:09 CEST 2014 on sn-devel-104 commit b2803950fc439017680069813fc49255a3f0cbbf Author: Stefan Metzmacher <me...@samba.org> Date: Thu Jul 10 14:28:56 2014 +0200 selftest: teardown the environments also on getting SIGPIPE make test uses selftest.pl | subuntu-filter.py ... FAIL_IMMEDIATELY=1 lets subuntu-filter.py exit, which generates SIGPIPE in selftest.pl. We should handle this just like any other signal and teardown all environments. This should make the teardown process more reliable/verbose. Pair-Programmed-With: Michael Adam <ob...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> Signed-off-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: selftest/selftest.pl | 25 +++++++++++++++---------- source3/winbindd/winbindd.h | 4 ---- 2 files changed, 15 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 831ebd9..fde8451 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -64,14 +64,6 @@ my $prefix = "./st"; my @includes = (); my @excludes = (); -sub pipe_handler { - my $sig = shift @_; - print STDERR "Exiting early because of SIGPIPE.\n"; - exit(1); -} - -$SIG{PIPE} = \&pipe_handler; - sub find_in_list($$) { my ($list, $fullname) = @_; @@ -770,12 +762,24 @@ my @exported_envvars = ( "GID_RFC2307TEST" ); -$SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub { +sub sighandler($) +{ my $signame = shift; + + $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = 'DEFAULT'; + $SIG{PIPE} = 'IGNORE'; + + open(STDOUT, ">&STDERR") or die "can't dup STDOUT to STDERR: $!"; + + print "$0: PID[$$]: Got SIG${signame} teardown environments.\n"; teardown_env($_) foreach(keys %running_envs); - die("Received signal $signame"); + system("pstree -p $$"); + print "$0: PID[$$]: Exiting...\n"; + exit(1); }; +$SIG{INT} = $SIG{QUIT} = $SIG{TERM} = $SIG{PIPE} = \&sighandler; + sub setup_env($$) { my ($name, $prefix) = @_; @@ -871,6 +875,7 @@ sub teardown_env($) { my ($envname) = @_; return if ($envname eq "none"); + print STDERR "teardown_env($envname)\n"; my $env = get_running_env($envname); $env->{target}->teardown_env($env); delete $running_envs{$envname}; diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h index 5b98928..db5dac8 100644 --- a/source3/winbindd/winbindd.h +++ b/source3/winbindd/winbindd.h @@ -67,10 +67,6 @@ struct winbindd_cli_state { struct winbindd_request *request; /* Request from client */ struct tevent_queue *out_queue; struct winbindd_response *response; /* Respose to client */ - bool getpwent_initialized; /* Has getpwent_state been - * initialized? */ - bool getgrent_initialized; /* Has getgrent_state been - * initialized? */ struct getpwent_state *pwent_state; /* State for getpwent() */ struct getgrent_state *grent_state; /* State for getgrent() */ -- Samba Shared Repository