]> git.pld-linux.org Git - packages/rpm.git/blame_incremental - rpm-scripts-closefds.patch
- typo
[packages/rpm.git] / rpm-scripts-closefds.patch
... / ...
CommitLineData
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;
6 }
7- } else
8+ } else {
9+ long oldfl;
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 */
14+ Fcntl(fd, F_SETFD, (void*)oldfl);
15+ }
16+ }
17 /*@=type@*/
18 return fd;
19 /*@notreached@*/ break;
This page took 0.092924 seconds and 4 git commands to generate.