diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-02-03 00:43:00 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-02-03 00:43:00 +0100 |
commit | 603c0960ba7e27dfa25c1b0297deb1c4c5ed6746 (patch) | |
tree | 9fea595329b9aef397b0f054f147cd4f2b15e5d9 /include | |
parent | 0e84d54a1bdeb3a1c902053f19316680ec1b1db5 (diff) | |
download | mariadb-git-603c0960ba7e27dfa25c1b0297deb1c4c5ed6746.tar.gz |
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).
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h index 09adc9989ef..9e9651b7409 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -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 /* |