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
1cf3b0d3
Commit
1cf3b0d3
authored
May 23, 2006
by
msvensson@shellback.(none)
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
15b6bd3f
Changes
1
Hide 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 @
1cf3b0d3
...
...
@@ -927,14 +927,14 @@ sub sleep_until_file_created ($$$) {
sub
mtr_kill_processes
($)
{
my
$pids
=
shift
;
mtr_verbose
("
mtr_kill_processes
"
.
join
("
",
@$pids
));
foreach
my
$sig
(
15
,
9
)
foreach
my
$pid
(
@$pids
)
{
my
$retries
=
10
;
while
(
1
)
foreach
my
$sig
(
15
,
9
)
{
kill
(
$sig
,
@
{
$pids
});
last
unless
kill
(
0
,
@
{
$pids
})
and
$retries
--
;
last
if
mtr_kill_process
(
$pid
,
$sig
,
10
,
1
);
}
}
}
...
...
@@ -945,17 +945,20 @@ sub mtr_kill_process ($$$$) {
my
$signal
=
shift
;
my
$retries
=
shift
;
my
$timeout
=
shift
;
my
$max_loop
=
$timeout
*
10
;
# Sleeping 0.1 between each kill attempt
while
(
1
)
{
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