diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-03-16 10:50:45 +0100 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-03-16 10:50:45 +0100 |
commit | 691de48ddb9b14e423e64299448d4ee0d68e2714 (patch) | |
tree | 56459ce9f0ca11c9b3b6204299da8ae47ae8e138 /mysql-test/lib/My | |
parent | 690ab2272dce56e33166509c52dd81607e6493b3 (diff) | |
parent | bd20de0136bb222ab19e9a46ce3da971e9ddc19c (diff) | |
download | mariadb-git-691de48ddb9b14e423e64299448d4ee0d68e2714.tar.gz |
merge 51767
Diffstat (limited to 'mysql-test/lib/My')
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index b8f05778b6e..461897b56f0 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -60,11 +60,12 @@ use My::Platform; my %running; my $_verbose= 0; +my $start_exit= 0; END { # Kill any children still running for my $proc (values %running){ - if ( $proc->is_child($$) ){ + if ( $proc->is_child($$) and ! $start_exit){ #print "Killing: $proc\n"; if ($proc->wait_one(0)){ $proc->kill(); @@ -161,6 +162,11 @@ sub new { push(@safe_args, "--"); push(@safe_args, $path); # The program safe_process should execute + + if ($start_exit) { # Bypass safe_process instead, start program directly + @safe_args= (); + $safe_path= $path; + } push(@safe_args, @$$args); print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n" @@ -540,6 +546,13 @@ sub wait_all { } } +# +# Set global flag to tell all safe_process to exit after starting child +# + +sub start_exit { + $start_exit= 1; +} # # Check if any process has exited, but don't wait. |