diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-07-23 19:01:24 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-07-23 19:01:24 +0200 |
commit | 2399987a2a53c54b29cb76e574de8676466f77c8 (patch) | |
tree | 721847d68f8030ed644b460346794d3a4b81574e /mysql-test | |
parent | 53e14eaa0aab03020b7ae268e3a45d03ab6d7ac0 (diff) | |
download | mariadb-git-2399987a2a53c54b29cb76e574de8676466f77c8.tar.gz |
Bug #46212 safe_process: FATAL ERROR, Unknown option: --nocore
Also fixed mysqld.cc to avoid popup-boxes
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/lib/My/SafeProcess/safe_process_win.cc | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc index d85a9558a62..455262b29f5 100755 --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc @@ -163,6 +163,7 @@ int main(int argc, const char** argv ) HANDLE job_handle; HANDLE wait_handles[NUM_HANDLES]= {0}; PROCESS_INFORMATION process_info= {0}; + BOOL nocore= FALSE; sprintf(safe_process_name, "safe_process[%d]", pid); @@ -199,18 +200,22 @@ int main(int argc, const char** argv ) } break; } else { - if ( strcmp(arg, "--verbose") == 0 ) + if (strcmp(arg, "--verbose") == 0) verbose++; - else if ( strncmp(arg, "--parent-pid", 10) == 0 ) - { - /* Override parent_pid with a value provided by user */ - const char* start; + else if (strncmp(arg, "--parent-pid", 10) == 0) + { + /* Override parent_pid with a value provided by user */ + const char* start; if ((start= strstr(arg, "=")) == NULL) - die("Could not find start of option value in '%s'", arg); - start++; /* Step past = */ - if ((parent_pid= atoi(start)) == 0) - die("Invalid value '%s' passed to --parent-id", start); - } + die("Could not find start of option value in '%s'", arg); + start++; /* Step past = */ + if ((parent_pid= atoi(start)) == 0) + die("Invalid value '%s' passed to --parent-id", start); + } + else if (strcmp(arg, "--nocore") == 0) + { + nocore= TRUE; + } else die("Unknown option: %s", arg); } @@ -248,6 +253,11 @@ int main(int argc, const char** argv ) &jeli, sizeof(jeli)) == 0) message("SetInformationJobObject failed, continue anyway..."); + /* Avoid popup box */ + if (nocore) + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX + | SEM_NOOPENFILEERRORBOX); + #if 0 /* Setup stdin, stdout and stderr redirect */ si.dwFlags= STARTF_USESTDHANDLES; |