diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-28 07:40:27 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-28 09:12:39 +0200 |
commit | 36ffe4f467779cd282ed471f3bed8aee8a7c55bd (patch) | |
tree | 34c376c8216b31b4b7e13f779ed4c24296f89998 | |
parent | 7ac4a710725d1e439179c3846525b3245dc3f5f6 (diff) | |
download | samba-36ffe4f467779cd282ed471f3bed8aee8a7c55bd.tar.gz samba-36ffe4f467779cd282ed471f3bed8aee8a7c55bd.tar.bz2 samba-36ffe4f467779cd282ed471f3bed8aee8a7c55bd.zip |
selftest: Abort early on SIGPIPE.
-rwxr-xr-x | selftest/filter-subunit | 1 | ||||
-rwxr-xr-x | selftest/selftest.pl | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/selftest/filter-subunit b/selftest/filter-subunit index 3ec74c46c7..872d07fdb1 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -53,4 +53,5 @@ msg_ops = subunithelper.FilterOps(out, opts.prefix, expected_failures, try: sys.exit(subunithelper.parse_results(msg_ops, statistics, sys.stdin)) except subunithelper.ImmediateFail: + sys.stdout.flush() sys.exit(1) diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 2680b6adce..33af5e29b7 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -166,6 +166,14 @@ 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) = @_; |