Просмотр исходного кода

Properly warn when the child process received a signal

Guillem Jover лет назад: 19
Родитель
Сommit
dc69e6c35c
2 измененных файлов с 7 добавлено и 2 удалено
  1. 5 0
      ChangeLog
  2. 2 2
      lib/mlib.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2007-09-18  Guillem Jover  <guillem@debian.org>
+
+	* 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  <guillem@debian.org>
 
 	* src/remove.c (deferred_remove): Remove duplicate nested conditional,

+ 2 - 2
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") : "");