mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-32387 - prevent output during temporary changes to STDOUT/STDERR
create_process() temporarily changes STDOUT/STDERR output to error log file This might redirect mtr output on Windows, so avoid it by holding flush_lock.
This commit is contained in:
@ -114,6 +114,10 @@ sub create_process {
|
||||
|
||||
lock($win32_spawn_lock);
|
||||
|
||||
# STDOUT/STDERR are temporarily reassigned, avoid prevent
|
||||
# output from another thread
|
||||
lock($mtr_report::flush_lock);
|
||||
|
||||
#printf STDERR "stdin %d, stdout %d, stderr %d\n",
|
||||
# fileno STDIN, fileno STDOUT, fileno STDERR;
|
||||
|
||||
|
@ -88,7 +88,7 @@ sub flush_out {
|
||||
}
|
||||
|
||||
use if $^O eq "MSWin32", "threads::shared";
|
||||
my $flush_lock :shared;
|
||||
our $flush_lock :shared;
|
||||
|
||||
# Print to stdout
|
||||
sub print_out {
|
||||
|
Reference in New Issue
Block a user