Open syslog when logging sysconf(3) failure.
Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 1 week
This commit is contained in:
parent
cf63056fb3
commit
57d813e7ff
@ -168,7 +168,11 @@ descriptors_assert(const struct hast_resource *res, int pjdlogmode)
|
||||
|
||||
maxfd = sysconf(_SC_OPEN_MAX);
|
||||
if (maxfd < 0) {
|
||||
pjdlog_init(pjdlogmode);
|
||||
pjdlog_prefix_set("[%s] (%s) ", res->hr_name,
|
||||
role2str(res->hr_role));
|
||||
pjdlog_errno(LOG_WARNING, "sysconf(_SC_OPEN_MAX) failed");
|
||||
pjdlog_fini();
|
||||
maxfd = 16384;
|
||||
}
|
||||
for (fd = 0; fd <= maxfd; fd++) {
|
||||
|
Loading…
Reference in New Issue
Block a user