From 894272e995098b464497b0aa460ac33688c68482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 31 Mar 2020 15:30:55 +0200 Subject: [PATCH] Do not close file descriptors on parent #2628 --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3d98a443b..9da7e0805 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1443,14 +1443,19 @@ void ProxySQL_daemonize_wait_daemon() { bool ProxySQL_daemonize_phase2() { int rc; - /* Close FDs */ +/* + // we DO NOT close FDs anymore. See: + // https://github.com/sysown/proxysql/issues/2628 + // + // Close FDs if (daemon_close_all(-1) < 0) { daemon_log(LOG_ERR, "Failed to close all file descriptors: %s", strerror(errno)); - /* Send the error condition to the parent process */ + // Send the error condition to the parent process daemon_retval_send(1); return false; } +*/ rc=chdir(GloVars.datadir); if (rc) {