mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 10:07:19 +02:00
Util
- Added includes to make FreeBSD happy. - Added more error handling.
This commit is contained in:
parent
ffc456be88
commit
d5648b511c
1 changed files with 6 additions and 1 deletions
|
@ -48,6 +48,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
|
||||||
#include <Date.h>
|
#include <Date.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
|
@ -277,7 +279,10 @@ int execute (
|
||||||
int written;
|
int written;
|
||||||
const char * input_cstr = input.c_str ();
|
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)
|
if (pipe (pin) == -1)
|
||||||
throw std::string (std::strerror (errno));
|
throw std::string (std::strerror (errno));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue