diff options
author | unknown <knielsen@mysql.com> | 2006-03-16 11:21:18 +0100 |
---|---|---|
committer | unknown <knielsen@mysql.com> | 2006-03-16 11:21:18 +0100 |
commit | fd6d45f0b0de5a8f0767d96d8f12cbca649f454c (patch) | |
tree | f2e9e7744a5c1f5830b6222fe6009cb2de2afc05 /mysql-test/lib | |
parent | b0a73946dccda7b973ae6bd4a2a9d97dc7ec27d6 (diff) | |
download | mariadb-git-fd6d45f0b0de5a8f0767d96d8f12cbca649f454c.tar.gz |
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.
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_timer.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/lib/mtr_timer.pl b/mysql-test/lib/mtr_timer.pl index 709cebd6407..a85ab8c6122 100644 --- a/mysql-test/lib/mtr_timer.pl +++ b/mysql-test/lib/mtr_timer.pl @@ -78,6 +78,12 @@ sub mtr_timer_start($$$) { { # Child, redirect output and exec # 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)"; sleep($duration); exit(0); |