Skip to content

Commit

Permalink
Make call_execute_on_exit_failure() more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Sep 20, 2024
1 parent 29fc212 commit 5f03c3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,15 +1574,15 @@ bool ProxySQL_daemonize_phase2() {
* @note This function does not return if an error occurs; it exits the process.
*/
void call_execute_on_exit_failure() {
// Log a message indicating the attempt to call the external script
proxy_info("Trying to call external script after exit failure: %s\n", GloVars.execute_on_exit_failure ? GloVars.execute_on_exit_failure : "(null)");

// Check if the global variable execute_on_exit_failure is NULL
if (GloVars.execute_on_exit_failure == NULL) {
// Exit the function if the variable is not set
return;
}

// Log a message indicating the attempt to call the external script
proxy_error("Trying to call external script after exit failure: %s\n", GloVars.execute_on_exit_failure);

// Fork a child process
pid_t cpid;
cpid = fork();
Expand Down

0 comments on commit 5f03c3a

Please sign in to comment.