fd = fdLink(fd, "persist (showProgress)");
+ oldfl=Fcntl(fd, F_GETFD, 0);
+ if(oldfl >= 0) {
+ oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
fd = fdLink(fd, "persist (showProgress)");
+ oldfl=Fcntl(fd, F_GETFD, 0);
+ if(oldfl >= 0) {
+ oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
- /*@=type@*/
- return fd;
- /*@notreached@*/ break;
+
+ #if defined(POSIX_FADV_WILLNEED)
+ (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);