From dc69e6c35cda3b9b58c8faf880b69967ac7b8eb4 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 18 Sep 2007 11:50:26 +0300 Subject: [PATCH] Properly warn when the child process received a signal --- ChangeLog | 5 +++++ lib/mlib.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5114391a..66d76ac9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-18 Guillem Jover + + * lib/mlib.c (checksubprocerr): Warn instead of erroring out in case + of receiving a signal and having been asked to only warn. + 2007-09-18 Guillem Jover * src/remove.c (deferred_remove): Remove duplicate nested conditional, diff --git a/lib/mlib.c b/lib/mlib.c index 2389f9f7..2842d881 100644 --- a/lib/mlib.c +++ b/lib/mlib.c @@ -118,8 +118,8 @@ int checksubprocerr(int status, const char *description, int flags) { } else if (WIFSIGNALED(status)) { n= WTERMSIG(status); if (!n || ((flags & PROCPIPE) && n==SIGPIPE)) return 0; if (flags & PROCWARN) - ohshit(_("dpkg: warning - %s killed by signal (%s)%s\n"), - description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : ""); + fprintf(stderr, _("dpkg: warning - %s killed by signal (%s)%s\n"), + description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : ""); else ohshit(_("subprocess %s killed by signal (%s)%s"), description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : ""); -- 2.39.5