~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/lib/My/SafeProcess.pm

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20120222141605-5xu64xtalgrxgoie
Tags: 5.1.61-0ubuntu0.10.10.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496
* Dropped patches unnecessary with 5.1.61:
  - debian/patches/61_CVE-2010-3833.dpatch
  - debian/patches/61_CVE-2010-3834.dpatch
  - debian/patches/61_CVE-2010-3835.dpatch
  - debian/patches/61_CVE-2010-3836.dpatch
  - debian/patches/61_CVE-2010-3837.dpatch
  - debian/patches/61_CVE-2010-3838.dpatch
  - debian/patches/61_CVE-2010-3839.dpatch
  - debian/patches/61_CVE-2010-3840.dpatch
  - debian/patches/60_abi-check-include.dpatch
  - debian/patches/62_disable_longfilename_test.dpatch
  - debian/patches/90_fix_testsuite_for_installed_env.dpatch
* debian/mysql-client-5.1.docs: removed EXCEPTIONS-CLIENT file
* debian/mysql-server-5.1.docs,debian/libmysqlclient16.docs,
  debian/libmysqlclient-dev.docs: removed, no longer necessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- cperl -*-
2
 
# Copyright (C) 2004-2006 MySQL AB
 
2
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3
3
#
4
 
# This program is free software; you can redistribute it and/or modify
5
 
# it under the terms of the GNU General Public License as published by
6
 
# the Free Software Foundation; version 2 of the License.
 
4
# This program is free software; you can redistribute it and/or
 
5
# modify it under the terms of the GNU Library General Public
 
6
# License as published by the Free Software Foundation; version 2
 
7
# of the License.
7
8
#
8
9
# This program is distributed in the hope that it will be useful,
9
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
# GNU General Public License for more details.
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
# Library General Public License for more details.
12
13
#
13
14
# You should have received a copy of the GNU General Public License
14
15
# along with this program; if not, write to the Free Software
60
61
 
61
62
my %running;
62
63
my $_verbose= 0;
 
64
my $start_exit= 0;
63
65
 
64
66
END {
65
67
  # Kill any children still running
66
68
  for my $proc (values %running){
67
 
    if ( $proc->is_child($$) ){
 
69
    if ( $proc->is_child($$) and ! $start_exit){
68
70
      #print "Killing: $proc\n";
69
71
      if ($proc->wait_one(0)){
70
72
        $proc->kill();
149
151
 
150
152
  push(@safe_args, "--");
151
153
  push(@safe_args, $path); # The program safe_process should execute
 
154
 
 
155
  if ($start_exit) {     # Bypass safe_process instead, start program directly
 
156
    @safe_args= ();
 
157
    $safe_path= $path;
 
158
  }
152
159
  push(@safe_args, @$$args);
153
160
 
154
161
  print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n"
528
535
  }
529
536
}
530
537
 
 
538
#
 
539
# Set global flag to tell all safe_process to exit after starting child
 
540
#
 
541
 
 
542
sub start_exit {
 
543
  $start_exit= 1;
 
544
}
531
545
 
532
546
#
533
547
# Check if any process has exited, but don't wait.