From 380b21d69e86fc34f9785369043b3933ec0df645 Mon Sep 17 00:00:00 2001 From: jbj Date: Thu, 7 Feb 2002 16:55:01 +0000 Subject: Sync with rpm-4.0.4. CVS patchset: 5303 CVS date: 2002/02/07 16:55:01 --- rpmio/rpmio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rpmio') 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; -- cgit v1.2.3