mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Windows : remove freopen(), "to keep fd = 0 busy".
a) We do not need this on Windows, and it is not clear what it does,inside service. b) It hinders debugging. mysql-test-run.pl --debugger=vsjitdebugger more often than , would stop here throwing "invalid handle" exception.
This commit is contained in:
parent
c3a3b77f9a
commit
56d6776524
1 changed files with 3 additions and 1 deletions
|
@ -5871,12 +5871,14 @@ int mysqld_main(int argc, char **argv)
|
|||
mysqld_port,
|
||||
MYSQL_COMPILATION_COMMENT);
|
||||
|
||||
#ifndef _WIN32
|
||||
// try to keep fd=0 busy
|
||||
if (!freopen(IF_WIN("NUL","/dev/null"), "r", stdin))
|
||||
if (!freopen("/dev/null", "r", stdin))
|
||||
{
|
||||
// fall back on failure
|
||||
fclose(stdin);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
|
||||
Service.SetRunning();
|
||||
|
|
Loading…
Reference in a new issue