From f1b564bb025062e9229ebd27273893fd3743ef86 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Fri, 24 May 2002 04:28:09 +0000 Subject: [PATCH] Use setcloexec wrapper instead of calling fcntl directly. --- ChangeLog | 4 ++++ lib/lock.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c3c4d6ed..b65e8fac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu May 23 23:23:03 CDT 2002 Adam Heath + + * lib/lock.c: Use setcloexec wrapper instead of calling fcntl directly. + Thu May 23 15:21:09 CDT 2002 Adam Heath * TODO: Add items for --reconfigure and --call-maint-script. diff --git a/lib/lock.c b/lib/lock.c index 0fcb5665..6294216d 100644 --- a/lib/lock.c +++ b/lib/lock.c @@ -78,6 +78,6 @@ void lockdatabase(const char *admindir) { ohshit(_("status database area is locked by another process")); ohshite(_("unable to lock dpkg status database")); } - fcntl(dblockfd, F_SETFD, FD_CLOEXEC); + setcloexec(dblockfd, dblockfile); push_cleanup(cu_unlockdb,~0, NULL,0, 0); } -- 2.39.5