The branch, master has been updated
       via  9ca339d341ab39043d26be6baa028b6b9012c747 (commit)
       via  0ceb5d63d6734796c9e04acfcb557807090f6f04 (commit)
      from  f780069c1aea962236c92968c05bbd21db30d3eb (commit)


- Shortlog ------------------------------------------------------------
9ca339d s-s-d: Do not print 'failed to kill' warning when doing pid polling
0ceb5d6 Do not use strdup for execvp arguments

Summary of changes:
 ChangeLog                 |   10 ++++++++++
 debian/changelog          |    4 ++++
 src/archives.c            |   19 +++++++++++--------
 utils/start-stop-daemon.c |    5 +++--
 4 files changed, 28 insertions(+), 10 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 9ca339d341ab39043d26be6baa028b6b9012c747
Author: Samuel Thibault <[EMAIL PROTECTED]>
Date:   Tue Jan 1 05:45:10 2008 +0200

    s-s-d: Do not print 'failed to kill' warning when doing pid polling
    
    Closes: #157305, #352554

diff --git a/ChangeLog b/ChangeLog
index 3d74ecf..4243fd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-01  Samuel Thibault  <[EMAIL PROTECTED]>
+
+       * utils/start-stop-daemon.c (do_stop): Do not print 'failed to kill'
+       warning when doing pid polling.
+
 2008-01-01  Guillem Jover  <[EMAIL PROTECTED]>
 
        * src/archives.c (archivefiles): Remove pointless strdup for execvp
diff --git a/debian/changelog b/debian/changelog
index 3839000..d08e289 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,9 @@ dpkg (1.14.15) UNRELEASED; urgency=low
     Closes: #214684
     Thanks to Andreas Metzler and Ian Zimmerman.
   * Do not use strdup for execvp arguments. Closes: #379027
+  * Do not print 'failed to kill' warning in start-stop-daemon when polling
+    the pid. Closes: #157305, #352554
+    Thanks to Samuel Thibault.
 
   [ Updated dpkg translations ]
   * Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index a1ef749..30bae57 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1079,8 +1079,9 @@ do_stop(int signal_nr, int quietmode, int *n_killed, int 
*n_notkilled, int retry
                        push(&killed, p->pid);
                        (*n_killed)++;
                } else {
-                       printf("%s: warning: failed to kill %d: %s\n",
-                              progname, p->pid, strerror(errno));
+                       if (signal_nr)
+                               printf("%s: warning: failed to kill %d: %s\n",
+                                      progname, p->pid, strerror(errno));
                        (*n_notkilled)++;
                }
        }

commit 0ceb5d63d6734796c9e04acfcb557807090f6f04
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Tue Jan 1 05:29:13 2008 +0200

    Do not use strdup for execvp arguments
    
    Closes: #379027

diff --git a/ChangeLog b/ChangeLog
index 8e06afa..3d74ecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-01  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * src/archives.c (archivefiles): Remove pointless strdup for execvp
+       arguments.
+
 2008-01-01  Ian Zimmerman  <[EMAIL PROTECTED]>
 
        * scripts/install-info.pl: Ignore wrapped lines when matching
diff --git a/debian/changelog b/debian/changelog
index 141ceaf..3839000 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ dpkg (1.14.15) UNRELEASED; urgency=low
   * Ignore wrapped lines in install-info when matching section titles.
     Closes: #214684
     Thanks to Andreas Metzler and Ian Zimmerman.
+  * Do not use strdup for execvp arguments. Closes: #379027
 
   [ Updated dpkg translations ]
   * Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918
diff --git a/src/archives.c b/src/archives.c
index df21d27..64a104e 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1097,7 +1097,7 @@ void archivefiles(const char *const *argv) {
       m_dup2(pi[1],1); close(pi[0]); close(pi[1]);
       for (i=0, ap=argv; *ap; ap++, i++);
       narglist= m_malloc(sizeof(char*)*(i+15));
-      narglist[0]= strdup(FIND);
+      narglist[0] = FIND;
       for (i=1, ap=argv; *ap; ap++, i++) {
         if (strchr(FIND_EXPRSTARTCHARS,(*ap)[0])) {
           char *a;
@@ -1106,15 +1106,18 @@ void archivefiles(const char *const *argv) {
           strcat(a,*ap);
           narglist[i]= a;
         } else {
-          narglist[i]= strdup(*ap);
+          narglist[i] = (char *)*ap;
         }
       }
-      narglist[i++]= strdup("-follow"); /*  When editing these, make sure that 
    */
-      narglist[i++]= strdup("-name");   /*  arglist is mallocd big enough, 
above.  */
-      narglist[i++]= strdup(ARCHIVE_FILENAME_PATTERN);
-      narglist[i++]= strdup("-type");
-      narglist[i++]= strdup("f");
-      narglist[i++]= strdup("-print0");
+      /* When editing these, make sure that arglist is malloced big enough,
+       * above.
+       */
+      narglist[i++] = "-follow";
+      narglist[i++] = "-name";
+      narglist[i++] = ARCHIVE_FILENAME_PATTERN;
+      narglist[i++] = "-type";
+      narglist[i++] = "f";
+      narglist[i++] = "-print0";
       narglist[i++]= 0;
       execvp(FIND, narglist);
       ohshite(_("failed to exec find for --recursive"));

-- 
dpkg's main repository


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

Reply via email to