diff options
author | Peter Powell <petpow@saberuk.com> | 2017-11-12 17:33:21 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-11-12 17:33:21 +0000 |
commit | d23c030c9a8fd58807438245a004e4aa5b7288ba (patch) | |
tree | d1207d9f811ba486470ac3869052b0bc2180f758 /src/coremods | |
parent | 2b94e7dcc072d923a3f3e8830dab9b45caaea118 (diff) | |
parent | 53d822a7d19aded988ee74eb05437e587cb1ac92 (diff) |
Merge tag 'v2.0.25' into master.
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_oper/cmd_restart.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coremods/core_oper/cmd_restart.cpp b/src/coremods/core_oper/cmd_restart.cpp index f76fd098d..6c19329c3 100644 --- a/src/coremods/core_oper/cmd_restart.cpp +++ b/src/coremods/core_oper/cmd_restart.cpp @@ -38,7 +38,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us DieRestart::SendError("Server restarting."); #ifndef _WIN32 - /* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execv() below succeeds. + /* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execvp() below succeeds. * Certainly, this is not a nice way to do things and it's slow when the fd limit is high. * * A better solution would be to set the close-on-exec flag for each fd we create (or create them with O_CLOEXEC), @@ -52,7 +52,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us } #endif - execv(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv); + execvp(ServerInstance->Config->cmdline.argv[0], ServerInstance->Config->cmdline.argv); ServerInstance->SNO->WriteGlobalSno('a', "Failed RESTART - could not execute '%s' (%s)", ServerInstance->Config->cmdline.argv[0], strerror(errno)); } |