diff --git a/src/lib/asiolink/process_spawn.cc b/src/lib/asiolink/process_spawn.cc index 8b60af76f0..3f9d1f48b6 100644 --- a/src/lib/asiolink/process_spawn.cc +++ b/src/lib/asiolink/process_spawn.cc @@ -138,7 +138,7 @@ private: /// /// This method is used to convert arguments specified as an STL container /// holding @c std::string objects to an array of C strings, used by the - /// @c execvpe function in the @c ProcessSpawnImpl::spawn. It allocates a + /// @c execve function in the @c ProcessSpawnImpl::spawn. It allocates a /// new C string and copies the contents of the @c src to it. /// The data is stored in an internal container so that the caller of the /// function can be exception safe. @@ -262,8 +262,8 @@ ProcessSpawnImpl::spawn(bool dismiss) { // We're in the child process. sigprocmask(SIG_SETMASK, &osset, 0); // Run the executable. - if (execvpe(executable_.c_str(), args_.get(), vars_.get()) != 0) { - // We may end up here if the execvpe failed, e.g. as a result + if (execve(executable_.c_str(), args_.get(), vars_.get()) != 0) { + // We may end up here if the execve failed, e.g. as a result // of issue with permissions or invalid executable name. _exit(EXIT_FAILURE); } diff --git a/src/lib/asiolink/process_spawn.h b/src/lib/asiolink/process_spawn.h index e8dd805d3a..57313290c2 100644 --- a/src/lib/asiolink/process_spawn.h +++ b/src/lib/asiolink/process_spawn.h @@ -43,7 +43,7 @@ typedef std::vector ProcessEnvVars; /// @brief Utility class for spawning new processes. /// /// This class is used to spawn new process by Kea. It forks the current -/// process and then uses the @c execvp function to execute the specified +/// process and then uses the @c execve function to execute the specified /// binary with parameters. The @c ProcessSpawn installs the handler for /// the SIGCHLD signal, which is executed when the child process ends. /// The handler checks the exit code returned by the process and records