#include <unistd.h>
#include <algorithm>
+#include <stdexcept>
#ifndef __USE_GNU
static char **environ= NULL;
iter != built_argv.end();
++iter)
{
- arg_buffer << *iter << " ";
+ if (*iter)
+ {
+ arg_buffer << *iter << " ";
+ }
}
return arg_buffer.str();
int error;
switch ((error= errno))
{
-#ifdef TARGET_OS_LINUX
+#ifdef __linux
case ERESTART:
#endif
case EINTR:
Application::error_t Application::join()
{
- pid_t waited_pid= waitpid(_pid, &_status, 0);
+ pid_t waited_pid= waitpid(_pid, &_status, WUNTRACED);
slurp();
if (waited_pid == _pid and WIFEXITED(_status) == false)
{
}
else if (waited_pid == -1)
{
- std::string error_string
+ std::string error_string;
if (stdout_result_length())
{
error_string+= " stdout: ";