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
b3c32153
Commit
b3c32153
authored
Jun 15, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verbose printouts added
parent
c857aa10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+22
-8
No files found.
mysql-test/lib/mtr_process.pl
View file @
b3c32153
...
...
@@ -629,6 +629,10 @@ sub mtr_check_stop_servers ($) {
{
mtr_error
("
we could not kill or clean up all processes
");
}
else
{
mtr_verbose
("
All ports where free, continuing
");
}
}
}
...
...
@@ -736,16 +740,22 @@ sub mtr_ping_with_timeout($) {
foreach
my
$srv
(
@$spec
)
{
$res
=
1
;
# We are optimistic
if
(
$srv
->
{'
pid
'}
and
defined
$srv
->
{'
port
'}
and
mtr_ping_port
(
$srv
->
{'
port
'})
)
if
(
$srv
->
{'
pid
'}
and
defined
$srv
->
{'
port
'}
)
{
mtr_verbose
("
waiting for process
$srv
->{'pid'} to stop
"
.
"
using port
$srv
->{'port'}
");
if
(
mtr_ping_port
(
$srv
->
{'
port
'})
)
{
mtr_verbose
("
waiting for process
$srv
->{'pid'} to stop
"
.
"
using port
$srv
->{'port'}
");
# Millisceond sleep emulated with select
select
(
undef
,
undef
,
undef
,
(
0.1
));
$res
=
0
;
next
TIME
;
# Millisceond sleep emulated with select
select
(
undef
,
undef
,
undef
,
(
0.1
));
$res
=
0
;
next
TIME
;
}
else
{
# Process was not using port
}
}
}
last
;
# If we got here, we are done
...
...
@@ -845,6 +855,8 @@ sub stop_reap_all {
sub
mtr_ping_port
($)
{
my
$port
=
shift
;
mtr_verbose
("
mtr_ping_port:
$port
");
my
$remote
=
"
localhost
";
my
$iaddr
=
inet_aton
(
$remote
);
if
(
!
$iaddr
)
...
...
@@ -860,10 +872,12 @@ sub mtr_ping_port ($) {
if
(
connect
(
SOCK
,
$paddr
)
)
{
close
(
SOCK
);
# FIXME check error?
mtr_verbose
("
USED
");
return
1
;
}
else
{
mtr_verbose
("
FREE
");
return
0
;
}
}
...
...
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