]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-scripts-closefds.patch
- rel 46; fake python version for eggs dependency generator, so it will generate...
[packages/rpm.git] / rpm-scripts-closefds.patch
CommitLineData
5b0f0ac9
MM
1--- rpm-4.1/lib/rpminstall.c.wiget Mon Sep 16 21:06:08 2002
2+++ rpm-4.1/lib/rpminstall.c Thu Sep 19 00:03:36 2002
3@@ -126,8 +126,15 @@
4 xx = Fclose(fd);
5 fd = NULL;
3dbbfd10 6 }
5b0f0ac9 7- } else
3dbbfd10 8+ } else {
7c316649 9+ long oldfl;
5b0f0ac9
MM
10 fd = fdLink(fd, "persist (showProgress)");
11+ oldfl=Fcntl(fd, F_GETFD, 0);
12+ if(oldfl >= 0) {
13+ oldfl |= FD_CLOEXEC; /* scripts shouldn't inherit rpm file descriptor */
7c316649 14+ Fcntl(fd, F_SETFD, (void*)oldfl);
5b0f0ac9
MM
15+ }
16+ }
751668e8
JR
17
18 #if defined(POSIX_FADV_WILLNEED)
19 (void) Fadvise(fd, 0, 0, POSIX_FADV_WILLNEED);
This page took 0.073551 seconds and 4 git commands to generate.