The following commit has been merged in the lenny branch:
commit 8fe053cbfd17ca08d6d00a29f3fe82967eb0e385
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Wed Jun 4 08:07:31 2008 +0300

    Close --status-fd file descriptors on exec
    
    This avoids those being inherited by the childs.
    Closes: #471488, #487684

diff --git a/ChangeLog b/ChangeLog
index 8adab5f..87f8e50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-16  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * src/main.c (setpipe): Set file descriptors to close on exec.
+
 2008-08-15  Guillem Jover  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-buildpackage.pl (usage): Fix description of -si option.
diff --git a/debian/changelog b/debian/changelog
index 1f3e4cf..8b5224c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ dpkg (1.14.21) UNRELEASED; urgency=low
     ruling established in #430649).
   * Fix dpkg-source to not use -i and -I by default with "1.0" source
     packages. Closes: #495138
+  * Close --status-fd file descriptors on exec, so that they are not
+    inherited by the childs. Closes: #471488, #487684
 
   [ Guillem Jover ]
   * When loading the status file fix up any inconsistent package in state
diff --git a/src/main.c b/src/main.c
index 41c08e1..a9cd968 100644
--- a/src/main.c
+++ b/src/main.c
@@ -299,6 +299,8 @@ static void setpipe(const struct cmdinfo *cip, const char 
*value) {
   if (*ep || v > INT_MAX)
     badusage(_("invalid integer for --%s: `%.250s'"),cip->olong,value);
 
+  setcloexec(v, _("<package status and progress file descriptor>"));
+
   lastpipe= cip->parg;
   if (*lastpipe) {
     (*lastpipe)->next= nfmalloc(sizeof(struct pipef));

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to