Skip to content

Commit

Permalink
Do not close file descriptors on parent #2628
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Mar 31, 2020
1 parent 8cbaa19 commit 894272e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 894272e

Please sign in to comment.