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
78a249f5
Commit
78a249f5
authored
May 23, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use mtr_kill_process from mtr_kill_processes
Change to use 0.1 second sleep between kill attempt
parent
4f0bda6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+11
-8
No files found.
mysql-test/lib/mtr_process.pl
View file @
78a249f5
...
@@ -927,14 +927,14 @@ sub sleep_until_file_created ($$$) {
...
@@ -927,14 +927,14 @@ sub sleep_until_file_created ($$$) {
sub
mtr_kill_processes
($)
{
sub
mtr_kill_processes
($)
{
my
$pids
=
shift
;
my
$pids
=
shift
;
mtr_verbose
("
mtr_kill_processes
"
.
join
("
",
@$pids
));
mtr_verbose
("
mtr_kill_processes
"
.
join
("
",
@$pids
));
foreach
my
$sig
(
15
,
9
)
foreach
my
$pid
(
@$pids
)
{
{
my
$retries
=
10
;
foreach
my
$sig
(
15
,
9
)
while
(
1
)
{
{
kill
(
$sig
,
@
{
$pids
});
last
if
mtr_kill_process
(
$pid
,
$sig
,
10
,
1
);
last
unless
kill
(
0
,
@
{
$pids
})
and
$retries
--
;
}
}
}
}
}
}
...
@@ -945,17 +945,20 @@ sub mtr_kill_process ($$$$) {
...
@@ -945,17 +945,20 @@ sub mtr_kill_process ($$$$) {
my
$signal
=
shift
;
my
$signal
=
shift
;
my
$retries
=
shift
;
my
$retries
=
shift
;
my
$timeout
=
shift
;
my
$timeout
=
shift
;
my
$max_loop
=
$timeout
*
10
;
# Sleeping 0.1 between each kill attempt
while
(
1
)
while
(
1
)
{
{
kill
(
$signal
,
$pid
);
kill
(
$signal
,
$pid
);
last
unless
kill
(
0
,
$pid
)
and
$
retries
--
;
last
unless
kill
(
0
,
$pid
)
and
$
max_loop
--
;
mtr_
debug
("
Sleep
$timeout
second waiting for processes to die
");
mtr_
verbose
("
Sleep 0.1
second waiting for processes to die
");
s
leep
(
$timeout
);
s
elect
(
undef
,
undef
,
undef
,
0.1
);
}
}
return
$max_loop
;
}
}
##############################################################################
##############################################################################
...
...
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