mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
parent
eb4afb1eda
commit
f4c132ca5b
@ -27,6 +27,7 @@
|
|||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/thread/thread.hpp>
|
#include <boost/thread/thread.hpp>
|
||||||
|
#include <boost/algorithm/string/join.hpp>
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <execvpe.h>
|
#include <execvpe.h>
|
||||||
@ -67,6 +68,8 @@ ProcessResult Process::Run(void)
|
|||||||
#endif /* HAVE_PIPE2 */
|
#endif /* HAVE_PIPE2 */
|
||||||
|
|
||||||
// build argv
|
// build argv
|
||||||
|
Log(LogDebug, "base", "Running command '" + boost::algorithm::join(m_Arguments, " ") + "'.");
|
||||||
|
|
||||||
char **argv = new char *[m_Arguments.size() + 1];
|
char **argv = new char *[m_Arguments.size() + 1];
|
||||||
|
|
||||||
for (unsigned int i = 0; i < m_Arguments.size(); i++)
|
for (unsigned int i = 0; i < m_Arguments.size(); i++)
|
||||||
|
@ -21,17 +21,13 @@
|
|||||||
#include "base/process.h"
|
#include "base/process.h"
|
||||||
#include "base/array.h"
|
#include "base/array.h"
|
||||||
#include "base/objectlock.h"
|
#include "base/objectlock.h"
|
||||||
#include "base/logger_fwd.h"
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/algorithm/string/join.hpp>
|
|
||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
Process::Process(const std::vector<String>& arguments, const Dictionary::Ptr& extraEnvironment)
|
Process::Process(const std::vector<String>& arguments, const Dictionary::Ptr& extraEnvironment)
|
||||||
: m_Arguments(arguments), m_ExtraEnvironment(extraEnvironment), m_Timeout(600)
|
: m_Arguments(arguments), m_ExtraEnvironment(extraEnvironment), m_Timeout(600)
|
||||||
{
|
{ }
|
||||||
Log(LogDebug, "base", "Running command '" + boost::algorithm::join(arguments, " ") + "'.");
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<String> Process::SplitCommand(const Value& command)
|
std::vector<String> Process::SplitCommand(const Value& command)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user