diff options
author | unknown <msvensson@pilot.blaudden> | 2007-02-28 10:52:51 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-02-28 10:52:51 +0100 |
commit | 4d49015bf9dafab0f08adada3a9011b6aeecf31c (patch) | |
tree | 5bbd8f3a4ac607d7fcbbdeff47938f3fd4dc3bea /mysql-test/lib/mtr_process.pl | |
parent | e40bcac08ed55c122b05bdbd04c273a665bea3b2 (diff) | |
download | mariadb-git-4d49015bf9dafab0f08adada3a9011b6aeecf31c.tar.gz |
Bug#26416 mysql-test-run exits with "Hangup" when piped to grep
- Thanks to Christian for the patch!
mysql-test/lib/mtr_process.pl:
Avoid printout of "Hangup" when script exits by using
POSIX::kill
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 20dca4b6980..e9e0dcce1b8 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -8,7 +8,7 @@ use Socket; use Errno; use strict; -use POSIX 'WNOHANG'; +use POSIX qw(WNOHANG SIGHUP); sub mtr_run ($$$$$$;$); sub mtr_spawn ($$$$$$;$); @@ -1100,12 +1100,6 @@ sub mtr_kill_processes ($) { # ############################################################################## -# FIXME something is wrong, we sometimes terminate with "Hangup" written -# to tty, and no STDERR output telling us why. - -# FIXME for some reason, setting HUP to 'IGNORE' will cause exit() to -# write out "Hangup", and maybe loose some output. We insert a sleep... - sub mtr_exit ($) { my $code= shift; mtr_timer_stop_all($::glob_timers); @@ -1117,7 +1111,7 @@ sub mtr_exit ($) { # set ourselves as the group leader at startup (with # POSIX::setpgrp(0,0)), but then care must be needed to always do # proper child process cleanup. - kill('HUP', -$$) if !$::glob_win32_perl and $$ == getpgrp(); + POSIX::kill(SIGHUP, -$$) if !$::glob_win32_perl and $$ == getpgrp(); exit($code); } |