From 1d9a0eeb6efade6bd4434c80e3788f8fcf61fa83 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Thu, 23 May 2002 16:14:56 +0000 Subject: [PATCH] Always set CLOEXEC on the lock fd. --- ChangeLog | 4 ++++ debian/changelog | 1 + lib/lock.c | 3 +-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a7f34c2..54ef7172 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu May 23 11:16:28 CDT 2002 Adam Heath + + * lib/lock.c: Always set CLOEXEC on the lock fd. + Wed May 22 13:03:41 CDT 2002 Adam Heath * lib/Makefile.in: Remove hash.c from SOURCES, as it is a test file. diff --git a/debian/changelog b/debian/changelog index 936c0925..6e14ab03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -92,6 +92,7 @@ dpkg (1.10) unstable; urgency=low * Document --force-confmiss and --force-bad-verify. Closes: Bug#146855 * Drop upgrade compat stuff in dpkg postinst for ancient versions (over 5 years old) + * Always set CLOEXEC on the lock fd. Closes: Bug#147872 -- Wichert Akkerman Mon, 20 Aug 2001 14:54:38 +0200 diff --git a/lib/lock.c b/lib/lock.c index 8de49094..0fcb5665 100644 --- a/lib/lock.c +++ b/lib/lock.c @@ -78,7 +78,6 @@ void lockdatabase(const char *admindir) { ohshit(_("status database area is locked by another process")); ohshite(_("unable to lock dpkg status database")); } - n= fcntl(dblockfd, F_GETFD); - if (n >= 0) fcntl(dblockfd, F_SETFD, n | FD_CLOEXEC); + fcntl(dblockfd, F_SETFD, FD_CLOEXEC); push_cleanup(cu_unlockdb,~0, NULL,0, 0); } -- 2.39.5