diff options
author | jbj <devnull@localhost> | 2002-02-07 16:55:01 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-02-07 16:55:01 +0000 |
commit | 380b21d69e86fc34f9785369043b3933ec0df645 (patch) | |
tree | 9247ff0902be3b3af3c1c04c9b2825d56420fc36 /rpmio/rpmio.c | |
parent | 56de656223afce0b119f4c44addaaa5642f3ed52 (diff) | |
download | rpm-380b21d69e86fc34f9785369043b3933ec0df645.tar.gz rpm-380b21d69e86fc34f9785369043b3933ec0df645.tar.bz2 rpm-380b21d69e86fc34f9785369043b3933ec0df645.zip |
Sync with rpm-4.0.4.
CVS patchset: 5303
CVS date: 2002/02/07 16:55:01
Diffstat (limited to 'rpmio/rpmio.c')
-rw-r--r-- | rpmio/rpmio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 0c4a90d64..c39dfdc9c 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -487,6 +487,10 @@ DBGIO(fd, (stderr, "==>\tfdClose(%p) rc %lx %s\n", (fd ? fd : NULL), (unsigned l fdno = open(path, flags, mode); if (fdno < 0) return NULL; + if (fcntl(fdno, F_SETFD, FD_CLOEXEC)) { + (void) close(fdno); + return NULL; + } fd = fdNew("open (fdOpen)"); fdSetFdno(fd, fdno); fd->flags = flags; |