Treat fstat(2) failure (different than EBADF) as fatal error.

Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>
MFC after:	1 week
This commit is contained in:
pjd 2011-02-06 14:07:58 +00:00
parent 57d813e7ff
commit 8d12ba19c5

View File

@ -188,6 +188,7 @@ descriptors_assert(const struct hast_resource *res, int pjdlogmode)
snprintf(msg, sizeof(msg),
"Unable to fstat descriptor %d: %s", fd,
strerror(errno));
break;
}
if (fd == STDIN_FILENO || fd == STDOUT_FILENO ||
fd == STDERR_FILENO) {