Skip to content

Commit 603c096

Browse files
committed
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).
1 parent 0e84d54 commit 603c096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/my_global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
436436
#endif
437437

438438
#ifndef STDERR_FILENO
439-
#define STDERR_FILENO 2
439+
#define STDERR_FILENO fileno(stderr)
440440
#endif
441441

442442
/*

0 commit comments

Comments
 (0)