From 0375f2e2730c6e30f3e6f171c9b73d8553a3ae9a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 14 Jul 2017 15:30:27 +0200 Subject: 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. --- mysys/my_fopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysys/my_fopen.c') diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index 99a9035c0c2..9131a2549e0 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -143,7 +143,7 @@ static int no_close(void *cookie __attribute__((unused))) /* A hack around a race condition in the implementation of freopen. - The race condition steams from the fact that the current fd of + The race condition stems from the fact that the current fd of the stream is closed before its number is used to duplicate the new file descriptor. This defeats the desired atomicity of the close and duplicate of dup2(). -- cgit v1.2.1