The following commit has been merged in the master branch:
commit ef339f3715418ddaabb7923a7d5157f522687954
Author: Guillem Jover <[email protected]>
Date:   Sat Jan 29 05:52:30 2011 +0100

    libdpkg: Improve subprocess signal handling in subproc_check()
    
    Explicitly handle user interruption, which should be slightly more
    helpful for the user and will allow to use subproc_check() in dselect's
    falliblesubprocess(). Improve too the output strings.

diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index 1c4810e..71fe734 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -123,8 +123,12 @@ subproc_check(int status, const char *desc, int flags)
                if ((flags & PROCPIPE) && n == SIGPIPE)
                        return 0;
 
-               out(_("subprocess %s killed by signal (%s)%s"), desc,
-                   strsignal(n), WCOREDUMP(status) ? _(", core dumped") : "");
+               if (n == SIGINT)
+                       out(_("subprocess %s was interrupted"), desc);
+               else
+                       out(_("subprocess %s was killed by signal (%s)%s"),
+                           desc, strsignal(n),
+                           WCOREDUMP(status) ? _(", core dumped") : "");
        } else {
                out(_("subprocess %s failed with wait status code %d"), desc,
                    status);

-- 
dpkg's main repository


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

Reply via email to