mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 13:37:55 +00:00
[#1712] fixed compilation on freebsd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ typedef std::vector<std::string> 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
|
||||
|
Reference in New Issue
Block a user