summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My/SafeProcess/safe_process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/lib/My/SafeProcess/safe_process.cc')
-rw-r--r--mysql-test/lib/My/SafeProcess/safe_process.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc
index 12b335ec444..2f90b65f62e 100644
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -176,7 +176,7 @@ int main(int argc, char* const argv[] )
} else {
if ( strcmp(arg, "--verbose") == 0 )
verbose++;
- else if ( strncmp(arg, "--parent-pid", 10) == 0 )
+ else if ( strncmp(arg, "--parent-pid", 12) == 0 )
{
/* Override parent_pid with a value provided by user */
const char* start;
@@ -185,10 +185,15 @@ int main(int argc, char* const argv[] )
start++; /* Step past = */
if ((parent_pid= atoi(start)) == 0)
die("Invalid value '%s' passed to --parent-id", start);
- } else if ( strcmp(arg, "--nocore") == 0 )
+ }
+ else if ( strcmp(arg, "--nocore") == 0 )
{
nocore = true; // Don't allow the process to dump core
}
+ else if ( strncmp (arg, "--env ", 6) == 0 )
+ {
+ putenv(strdup(arg+6));
+ }
else
die("Unknown option: %s", arg);
}