summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-07-14 15:30:27 +0200
committerSergei Golubchik <serg@mariadb.org>2017-07-15 08:44:14 +0200
commit0375f2e2730c6e30f3e6f171c9b73d8553a3ae9a (patch)
treeff3b9906554c87066b47270876b370bbc92de74f /include
parent7338d3f221e33042dfcf5c1a245317aa7cb015a7 (diff)
downloadmariadb-git-0375f2e2730c6e30f3e6f171c9b73d8553a3ae9a.tar.gz
MDEV-12144 Signal 6 crash corrupts ibd files
Avoid using STDERR_FILENO. The server uses freopen(stderr), so stderr can be on any file descriptor.
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 0c15478439f..42e3c1ad0c8 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -421,9 +421,8 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#define SIGNAL_HANDLER_RESET_ON_DELIVERY
#endif
-#ifndef STDERR_FILENO
-#define STDERR_FILENO fileno(stderr)
-#endif
+/* don't assume that STDERR_FILENO is 2, mysqld can freopen */
+#undef STDERR_FILENO
/*
Deprecated workaround for false-positive uninitialized variables