]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-scripts-closefds.patch
- package remaining missing files
[packages/rpm.git] / rpm-scripts-closefds.patch
index 5a9f7871c0cc8e2ed94212d9e5e08052fecdc5a1..84c3d298360b79ee3a61124d10287a2c24e1a325 100644 (file)
@@ -1,19 +1,19 @@
 --- rpm-4.1/lib/rpminstall.c.wiget     Mon Sep 16 21:06:08 2002
 +++ rpm-4.1/lib/rpminstall.c   Thu Sep 19 00:03:36 2002
 @@ -126,8 +126,15 @@
-               xx = Fclose(fd);
+               Fclose(fd);
                fd = NULL;
            }
 -      } else
 +      } else {
 +          long oldfl;
-           fd = fdLink(fd, "persist (showProgress)");
+           fd = fdLink(fd);
 +          oldfl=Fcntl(fd, F_GETFD, 0);
 +          if(oldfl >= 0) {
 +              oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
 +              Fcntl(fd, F_SETFD, (void*)oldfl);
 +          }
 +      }
+       return (void *)fd;
+       break;
  
- #if defined(POSIX_FADV_WILLNEED)
-       (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);
This page took 0.037018 seconds and 4 git commands to generate.