if (async && (errno == EAGAIN || errno == EACCES)) {
return FALSE;
}
- if (errno != ENOTSUP) {
- msg_warn ("lock on file failed: %s", strerror (errno));
- }
return FALSE;
}
return FALSE;
}
- if (errno != ENOTSUP) {
- msg_warn ("unlock on file failed: %s", strerror (errno));
- }
return FALSE;
}
#endif
#ifndef HAVE_OCLOEXEC
+ int serrno;
if (fcntl (fd, F_SETFD, FD_CLOEXEC) == -1) {
- msg_warn ("fcntl failed: %d, '%s'", errno, strerror (errno));
+ serrno = errno;
close (fd);
+ errno = serrno;
return -1;
}