mirror of
https://github.com/MariaDB/server.git
synced 2025-07-04 01:23:45 +03:00
Fix bug in mysql-test-run.pl in ^C signal handler.
mysql-test/lib/mtr_timer.pl: Fix bug where ^C would trigger cleanup handler in both parent and timeout child processes, causing duplicated messages and potential conflicts.
This commit is contained in:
@ -78,6 +78,12 @@ sub mtr_timer_start($$$) {
|
|||||||
{
|
{
|
||||||
# Child, redirect output and exec
|
# Child, redirect output and exec
|
||||||
# FIXME do we need to redirect streams?
|
# FIXME do we need to redirect streams?
|
||||||
|
|
||||||
|
# Don't do the ^C cleanup in the timeout child processes!
|
||||||
|
# There is actually a race here, if we get ^C after fork(), but before
|
||||||
|
# clearing the signal handler.
|
||||||
|
$SIG{INT}= 'DEFAULT';
|
||||||
|
|
||||||
$0= "mtr_timer(timers,$name,$duration)";
|
$0= "mtr_timer(timers,$name,$duration)";
|
||||||
sleep($duration);
|
sleep($duration);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Reference in New Issue
Block a user