svn commit: samba r24899 - in branches/SAMBA_4_0: . source/selftest
jelmer at samba.org
jelmer at samba.org
Sun Sep 2 17:13:56 GMT 2007
Author: jelmer
Date: 2007-09-02 17:13:56 +0000 (Sun, 02 Sep 2007)
New Revision: 24899
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24899
Log:
Register signal handler that tears down environment.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/selftest/selftest.pl
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Modified: branches/SAMBA_4_0/source/selftest/selftest.pl
===================================================================
--- branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-02 16:17:12 UTC (rev 24898)
+++ branches/SAMBA_4_0/source/selftest/selftest.pl 2007-09-02 17:13:56 UTC (rev 24899)
@@ -615,6 +615,12 @@
"WINBINDD_SOCKET_DIR"
);
+$SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
+ my $signame = shift;
+ teardown_env($_) foreach(keys %running_envs);
+ die("Received signal $signame");
+};
+
sub setup_env($)
{
my ($envname) = @_;
@@ -633,6 +639,8 @@
return undef unless defined($testenv_vars);
+ $running_envs{$envname} = $testenv_vars;
+
SocketWrapper::set_default_iface(6);
write_clientconf($conffile, $testenv_vars);
@@ -644,7 +652,6 @@
}
}
- $running_envs{$envname} = $testenv_vars;
return $testenv_vars;
}
More information about the samba-cvs
mailing list