diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-07-31 16:05:58 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-28 09:19:29 +0200 |
commit | b9dcd8de22bd198ab6c928d76949419e8c24c131 (patch) | |
tree | 3c02d945d9e7af990575f069d83edefdeb68d0c6 /Porting | |
parent | 61ae9994ad9d74eebddeccc7412cbf253fba014b (diff) | |
download | perl-b9dcd8de22bd198ab6c928d76949419e8c24c131.tar.gz |
Add an option to bisect.pl to run the user testcase in its own process group.
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bisect-runner.pl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index d8172f40c3..110d67c72f 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -60,7 +60,8 @@ unless(GetOptions(\%options, $options{match} = $_[1]; $options{'expect-pass'} = 0; }, - 'force-manifest', 'force-regen', 'test-build', 'validate', + 'force-manifest', 'force-regen', 'setpgrp!', + 'test-build', 'validate', 'all-fixups', 'early-fixup=s@', 'late-fixup=s@', 'valgrind', 'check-args', 'check-shebang!', 'usage|help|?', 'gold=s', 'A=s@', @@ -487,6 +488,13 @@ C<--expect-pass=0> is equivalent to C<--expect-fail>. I<1> is the default. =item * +--setpgrp + +Run the testcase in its own process group. Specifically, call C<setpgrp 0, 0> +just before C<exec>-ing the user testcase. + +=item * + --all-fixups F<bisect-runner.pl> will minimally patch various files on a platform and @@ -723,6 +731,10 @@ sub run_with_options { open STDIN, '<', $options->{stdin} or die "Can't open STDIN from $options->{stdin}: $!"; } + if ($options->{setpgrp}) { + setpgrp 0, 0 + or die "Can't setpgrp 0, 0: $!"; + } { exec @_ }; die_255("Failed to start $name: $!"); } @@ -1003,7 +1015,7 @@ sub report_and_exit { } sub run_report_and_exit { - my $ret = run_with_options(undef, @_); + my $ret = run_with_options({setprgp => $options{setpgrp}}, @_); report_and_exit(!$ret, 'zero exit from', 'non-zero exit from', "@_"); } |