Procházet zdrojové kódy

Use setcloexec wrapper instead of calling fcntl directly.

Adam Heath před 24 roky
rodič
revize
f1b564bb02
2 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 4 0
      ChangeLog
  2. 1 1
      lib/lock.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+Thu May 23 23:23:03 CDT 2002 Adam Heath <doogie@debian.org>
+
+  * lib/lock.c: Use setcloexec wrapper instead of calling fcntl directly.
+
 Thu May 23 15:21:09 CDT 2002 Adam Heath <doogie@debian.org>
 
   * TODO: Add items for --reconfigure and --call-maint-script.

+ 1 - 1
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);
 }