Changelog for HylaFAX
+* be more informative with /dev/null errors (27 Sep 2005)
* don't place a call if there are no documents (27 Sep 2005)
* make hfaxd clean up after itself (27 Sep 2005)
* add xferfaxlog accounting for jobs that time out (27 Sep 2005)
endpwent(); // XXX some systems hold descriptors
closelog(); // XXX in case syslog has descriptor
int fd = Sys::open(_PATH_DEVNULL, O_RDWR);
+ if (fd == -1)
+ printf("Could not open null device file %s.", _PATH_DEVNULL);
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);
{
#ifdef O_NOCTTY
int fd = Sys::open(_PATH_DEVNULL, O_RDWR);
+ if (fd == -1)
+ printf("Could not open null device file %s.", _PATH_DEVNULL);
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);
detachFromTTY(void)
{
int fd = Sys::open(_PATH_DEVNULL, O_RDWR);
+ if (fd == -1)
+ fatal("Could not open null device file %s.", _PATH_DEVNULL);
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);