mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#25657 mysql-test-run.pl kill itself under ActiveState perl
- Various fixes for running mysql-test-run.pl on ActiveState perl for windows. Reading it's source in win32/win32.c helps... mysql-test/lib/mtr_process.pl: Use "real_pid" when killing the process on ActiveState perl for windows Wait blocking for the pseudo pid to exit. Change "sleep_until_file_created" to return 1 when pidfile has been created - this should avoid early wakeup if $pid was 0 mysql-test/lib/mtr_timer.pl: Wake timer process with signal 15 to avoid to avoid resource leak on ActiveState perl for windows. Install signal handler in timer process to exit gracefully mysql-test/mysql-test-run.pl: Read "real_pid" of process from pid_file - to be used when killing the process on ActiveState perl Drop the --console option to mysqld Pass "real_pid" to mtr_check_stop_server so it can select to use it Correct two argument declarations
This commit is contained in:
@ -97,9 +97,14 @@ sub mtr_timer_start($$$) {
|
||||
# clearing the signal handler.
|
||||
$SIG{INT}= 'DEFAULT';
|
||||
|
||||
$SIG{TERM}= sub {
|
||||
mtr_verbose("timer woke up, exiting!");
|
||||
exit(0);
|
||||
};
|
||||
|
||||
$0= "mtr_timer(timers,$name,$duration)";
|
||||
mtr_verbose("timer child $name, sleep $duration");
|
||||
sleep($duration);
|
||||
mtr_verbose("timer expired after $duration seconds");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@ -118,7 +123,7 @@ sub mtr_timer_stop ($$) {
|
||||
|
||||
# FIXME as Cygwin reuses pids fast, maybe check that is
|
||||
# the expected process somehow?!
|
||||
kill(9, $tpid);
|
||||
kill(15, $tpid);
|
||||
|
||||
# As the timers are so simple programs, we trust them to terminate,
|
||||
# and use blocking wait for it. We wait just to avoid a zombie.
|
||||
|
Reference in New Issue
Block a user