Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
63d47d5f
Commit
63d47d5f
authored
Jul 23, 2009
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #46212 safe_process: FATAL ERROR, Unknown option: --nocore
Also fixed mysqld.cc to avoid popup-boxes
parent
e2791e4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
20 deletions
+29
-20
mysql-test/lib/My/SafeProcess/safe_process_win.cc
mysql-test/lib/My/SafeProcess/safe_process_win.cc
+20
-10
sql/mysqld.cc
sql/mysqld.cc
+9
-10
No files found.
mysql-test/lib/My/SafeProcess/safe_process_win.cc
View file @
63d47d5f
...
@@ -163,6 +163,7 @@ int main(int argc, const char** argv )
...
@@ -163,6 +163,7 @@ int main(int argc, const char** argv )
HANDLE
job_handle
;
HANDLE
job_handle
;
HANDLE
wait_handles
[
NUM_HANDLES
]
=
{
0
};
HANDLE
wait_handles
[
NUM_HANDLES
]
=
{
0
};
PROCESS_INFORMATION
process_info
=
{
0
};
PROCESS_INFORMATION
process_info
=
{
0
};
BOOL
nocore
=
FALSE
;
sprintf
(
safe_process_name
,
"safe_process[%d]"
,
pid
);
sprintf
(
safe_process_name
,
"safe_process[%d]"
,
pid
);
...
@@ -199,18 +200,22 @@ int main(int argc, const char** argv )
...
@@ -199,18 +200,22 @@ int main(int argc, const char** argv )
}
}
break
;
break
;
}
else
{
}
else
{
if
(
strcmp
(
arg
,
"--verbose"
)
==
0
)
if
(
strcmp
(
arg
,
"--verbose"
)
==
0
)
verbose
++
;
verbose
++
;
else
if
(
strncmp
(
arg
,
"--parent-pid"
,
10
)
==
0
)
else
if
(
strncmp
(
arg
,
"--parent-pid"
,
10
)
==
0
)
{
{
/* Override parent_pid with a value provided by user */
/* Override parent_pid with a value provided by user */
const
char
*
start
;
const
char
*
start
;
if
((
start
=
strstr
(
arg
,
"="
))
==
NULL
)
if
((
start
=
strstr
(
arg
,
"="
))
==
NULL
)
die
(
"Could not find start of option value in '%s'"
,
arg
);
die
(
"Could not find start of option value in '%s'"
,
arg
);
start
++
;
/* Step past = */
start
++
;
/* Step past = */
if
((
parent_pid
=
atoi
(
start
))
==
0
)
if
((
parent_pid
=
atoi
(
start
))
==
0
)
die
(
"Invalid value '%s' passed to --parent-id"
,
start
);
die
(
"Invalid value '%s' passed to --parent-id"
,
start
);
}
}
else
if
(
strcmp
(
arg
,
"--nocore"
)
==
0
)
{
nocore
=
TRUE
;
}
else
else
die
(
"Unknown option: %s"
,
arg
);
die
(
"Unknown option: %s"
,
arg
);
}
}
...
@@ -248,6 +253,11 @@ int main(int argc, const char** argv )
...
@@ -248,6 +253,11 @@ int main(int argc, const char** argv )
&
jeli
,
sizeof
(
jeli
))
==
0
)
&
jeli
,
sizeof
(
jeli
))
==
0
)
message
(
"SetInformationJobObject failed, continue anyway..."
);
message
(
"SetInformationJobObject failed, continue anyway..."
);
/* Avoid popup box */
if
(
nocore
)
SetErrorMode
(
SEM_FAILCRITICALERRORS
|
SEM_NOGPFAULTERRORBOX
|
SEM_NOOPENFILEERRORBOX
);
#if 0
#if 0
/* Setup stdin, stdout and stderr redirect */
/* Setup stdin, stdout and stderr redirect */
si.dwFlags= STARTF_USESTDHANDLES;
si.dwFlags= STARTF_USESTDHANDLES;
...
...
sql/mysqld.cc
View file @
63d47d5f
...
@@ -2103,15 +2103,14 @@ static void init_signals(void)
...
@@ -2103,15 +2103,14 @@ static void init_signals(void)
win_install_sigabrt_handler
();
win_install_sigabrt_handler
();
if
(
opt_console
)
if
(
opt_console
)
SetConsoleCtrlHandler
(
console_event_handler
,
TRUE
);
SetConsoleCtrlHandler
(
console_event_handler
,
TRUE
);
else
{
/* Avoid MessageBox()es*/
/* Avoid MessageBox()es*/
_CrtSetReportMode
(
_CRT_WARN
,
_CRTDBG_MODE_FILE
);
_CrtSetReportMode
(
_CRT_WARN
,
_CRTDBG_MODE_FILE
);
_CrtSetReportFile
(
_CRT_WARN
,
_CRTDBG_FILE_STDERR
);
_CrtSetReportFile
(
_CRT_WARN
,
_CRTDBG_FILE_STDERR
);
_CrtSetReportMode
(
_CRT_ERROR
,
_CRTDBG_MODE_FILE
);
_CrtSetReportMode
(
_CRT_ERROR
,
_CRTDBG_MODE_FILE
);
_CrtSetReportFile
(
_CRT_ERROR
,
_CRTDBG_FILE_STDERR
);
_CrtSetReportFile
(
_CRT_ERROR
,
_CRTDBG_FILE_STDERR
);
_CrtSetReportMode
(
_CRT_ASSERT
,
_CRTDBG_MODE_FILE
);
_CrtSetReportMode
(
_CRT_ASSERT
,
_CRTDBG_MODE_FILE
);
_CrtSetReportFile
(
_CRT_ASSERT
,
_CRTDBG_FILE_STDERR
);
_CrtSetReportFile
(
_CRT_ASSERT
,
_CRTDBG_FILE_STDERR
);
/*
/*
Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (),
Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (),
...
@@ -2120,8 +2119,8 @@ static void init_signals(void)
...
@@ -2120,8 +2119,8 @@ static void init_signals(void)
exception filter is not guaranteed to work in all situation
exception filter is not guaranteed to work in all situation
(like heap corruption or stack overflow)
(like heap corruption or stack overflow)
*/
*/
SetErrorMode
(
SetErrorMode
(
0
)
|
SEM_FAILCRITICALERRORS
|
SEM_NOOPENFILEERRORBOX
);
SetErrorMode
(
SetErrorMode
(
0
)
|
SEM_FAILCRITICALERRORS
}
|
SEM_NOOPENFILEERRORBOX
);
SetUnhandledExceptionFilter
(
my_unhandler_exception_filter
);
SetUnhandledExceptionFilter
(
my_unhandler_exception_filter
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment