1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

BUG#23735 Changes to comments in code for explanation of fix.

This commit is contained in:
cbell/Chuck@mysql_cab.
2006-11-02 08:34:16 -05:00
parent 367a41c308
commit 801f03381c

View File

@@ -1361,15 +1361,12 @@ static int dump_local_log_entries(const char* logname)
else // reading from stdin;
{
/*
Bug fix: #23735
Author: Chuck Bell
Description:
Windows opens stdin in text mode by default. Certain characters
such as CTRL-Z are interpeted as events and the read() method
will stop. CTRL-Z is the EOF marker in Windows. to get past this
you have to open stdin in binary mode. Setmode() is used to set
stdin in binary mode. Errors on setting this mode result in
halting the function and printing an error message to stderr.
Windows opens stdin in text mode by default. Certain characters
such as CTRL-Z are interpeted as events and the read() method
will stop. CTRL-Z is the EOF marker in Windows. to get past this
you have to open stdin in binary mode. Setmode() is used to set
stdin in binary mode. Errors on setting this mode result in
halting the function and printing an error message to stderr.
*/
#if defined (__WIN__) || (_WIN64)
if (_setmode(fileno(stdin), O_BINARY) == -1)