- Added includes to make FreeBSD happy.
- Added more error handling.
This commit is contained in:
Wilhelm Schuermann 2014-10-03 16:49:38 +02:00 committed by Paul Beckingham
parent ffc456be88
commit d5648b511c

View file

@ -48,6 +48,8 @@
#include <string.h>
#include <pwd.h>
#include <errno.h>
#include <signal.h>
#include <sys/select.h>
#include <Date.h>
#include <text.h>
@ -277,7 +279,10 @@ int execute (
int written;
const char * input_cstr = input.c_str ();
signal(SIGPIPE, SIG_IGN); // Handled locally with EPIPE.
if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) // Handled locally with EPIPE.
{
throw std::string (std::strerror (errno));
}
if (pipe (pin) == -1)
throw std::string (std::strerror (errno));