mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 06:25:34 +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
|
/// 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
|
/// 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.
|
/// 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
|
/// The data is stored in an internal container so that the caller of the
|
||||||
/// function can be exception safe.
|
/// function can be exception safe.
|
||||||
@@ -262,8 +262,8 @@ ProcessSpawnImpl::spawn(bool dismiss) {
|
|||||||
// We're in the child process.
|
// We're in the child process.
|
||||||
sigprocmask(SIG_SETMASK, &osset, 0);
|
sigprocmask(SIG_SETMASK, &osset, 0);
|
||||||
// Run the executable.
|
// Run the executable.
|
||||||
if (execvpe(executable_.c_str(), args_.get(), vars_.get()) != 0) {
|
if (execve(executable_.c_str(), args_.get(), vars_.get()) != 0) {
|
||||||
// We may end up here if the execvpe failed, e.g. as a result
|
// We may end up here if the execve failed, e.g. as a result
|
||||||
// of issue with permissions or invalid executable name.
|
// of issue with permissions or invalid executable name.
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,7 @@ typedef std::vector<std::string> ProcessEnvVars;
|
|||||||
/// @brief Utility class for spawning new processes.
|
/// @brief Utility class for spawning new processes.
|
||||||
///
|
///
|
||||||
/// This class is used to spawn new process by Kea. It forks the current
|
/// 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
|
/// binary with parameters. The @c ProcessSpawn installs the handler for
|
||||||
/// the SIGCHLD signal, which is executed when the child process ends.
|
/// the SIGCHLD signal, which is executed when the child process ends.
|
||||||
/// The handler checks the exit code returned by the process and records
|
/// The handler checks the exit code returned by the process and records
|
||||||
|
Reference in New Issue
Block a user