--- 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 @@ Fclose(fd); fd = NULL; } - } else + } else { + long oldfl; 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;