Commit 603c0960 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-9466 : Exception handler on Windows does not output any text,

if mysqld runs as service

The bug is caused by the attempt to write to filedescriptor 2
(STDERR_FILENO), however in case of a service stderr has different fd
(debugging shows fileno(stderr) is 4 after freopen, and -1 before it)

Fixed definition of STDERR_FILENO for Windows to be fileno(stderr).
parent 0e84d54a
......@@ -436,7 +436,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#endif
#ifndef STDERR_FILENO
#define STDERR_FILENO 2
#define STDERR_FILENO fileno(stderr)
#endif
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment