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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
724573f7
Commit
724573f7
authored
Mar 30, 2007
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: msvensson@shellback.(none)|ChangeSet|20070330134336|02280
parent
060fb5ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
28 deletions
+14
-28
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+10
-15
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+4
-13
No files found.
mysql-test/lib/mtr_process.pl
View file @
724573f7
...
...
@@ -562,7 +562,7 @@ sub mtr_check_stop_servers ($) {
# Return if no processes are defined
return
if
!
@$spec
;
mtr_verbose
("
mtr_check_stop_servers
");
#mtr_report
("mtr_check_stop_servers");
mtr_ping_with_timeout
(
\
@$spec
);
...
...
@@ -605,10 +605,7 @@ sub mtr_check_stop_servers ($) {
{
if
(
$srv
->
{'
pid
'}
)
{
# Add the process pid to list of pids to kill
# if the process has a "real_pid" use it
$mysqld_pids
{
$srv
->
{'
real_pid
'}
?
$srv
->
{'
real_pid
'}
:
$srv
->
{'
pid
'}}
=
1
;
$mysqld_pids
{
$srv
->
{'
pid
'}}
=
1
;
}
else
{
...
...
@@ -641,9 +638,13 @@ sub mtr_check_stop_servers ($) {
# that for true Win32 processes, kill(0,$pid) will not return 1.
# ----------------------------------------------------------------------
start_reap_all
();
# Avoid zombies
my
@mysqld_pids
=
keys
%
mysqld_pids
;
mtr_kill_processes
(
\
@mysqld_pids
);
stop_reap_all
();
# Get into control again
# ----------------------------------------------------------------------
# Now, we check if all we can find using kill(0,$pid) are dead,
# and just assume the rest are. We cleanup socket and PID files.
...
...
@@ -653,15 +654,14 @@ sub mtr_check_stop_servers ($) {
my
$errors
=
0
;
foreach
my
$srv
(
@$spec
)
{
my
$pid
=
$srv
->
{'
real_pid
'}
?
$srv
->
{'
real_pid
'}
:
$srv
->
{'
pid
'};
if
(
$pid
)
if
(
$srv
->
{'
pid
'}
)
{
if
(
kill
(
0
,
$pid
)
)
if
(
kill
(
0
,
$srv
->
{'
pid
'}
)
)
{
# FIXME In Cygwin there seem to be some fast reuse
# of PIDs, so dying may not be the right thing to do.
$errors
++
;
mtr_warning
("
can't kill process
$
pid
");
mtr_warning
("
can't kill process
$
srv
->{'pid'}
");
}
else
{
...
...
@@ -682,8 +682,6 @@ sub mtr_check_stop_servers ($) {
mtr_warning
("
couldn't delete
$file
");
}
}
# Reap the child
waitpid
(
$srv
->
{'
pid
'},
&
WNOHANG
);
$srv
->
{'
pid
'}
=
0
;
}
}
...
...
@@ -1065,10 +1063,7 @@ sub sleep_until_file_created ($$$) {
{
if
(
-
r
$pidfile
)
{
# Read real pid from pidfile
my
$real_pid
=
mtr_fromfile
(
$pidfile
);
mtr_verbose
("
pid:
$pid
, real_pid:
$real_pid
");
return
$real_pid
;
return
$pid
;
}
# Check if it died after the fork() was successful
...
...
mysql-test/mysql-test-run.pl
View file @
724573f7
...
...
@@ -2549,16 +2549,10 @@ sub ndbcluster_wait_started($$){
sub
mysqld_wait_started
($){
my
$mysqld
=
shift
;
my
$pid_from_pidfile
=
sleep_until_file_created
(
$mysqld
->
{'
path_pid
'},
my
$res
=
sleep_until_file_created
(
$mysqld
->
{'
path_pid
'},
$mysqld
->
{'
start_timeout
'},
$mysqld
->
{'
pid
'});
# On platforms with pseudo threads we need to save
# the real pid of mysqld read from pidfile
$mysqld
->
{'
real_pid
'}
=
$pid_from_pidfile
;
return
$pid_from_pidfile
==
0
;
return
$res
==
0
;
}
...
...
@@ -4053,7 +4047,6 @@ sub stop_all_servers () {
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
...
...
@@ -4260,7 +4253,6 @@ sub run_testcase_stop_servers($$$) {
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
...
...
@@ -4311,7 +4303,6 @@ sub run_testcase_stop_servers($$$) {
push
(
@kill_pids
,{
pid
=>
$mysqld
->
{'
pid
'},
real_pid
=>
$mysqld
->
{'
real_pid
'},
pidfile
=>
$mysqld
->
{'
path_pid
'},
sockfile
=>
$mysqld
->
{'
path_sock
'},
port
=>
$mysqld
->
{'
port
'},
...
...
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