Sfoglia il codice sorgente

libdpkg: Also return an error code for unhandled subprocess status

Guillem Jover 11 anni fa
parent
commit
b097b5cf5d
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      lib/dpkg/subproc.c

+ 3 - 0
lib/dpkg/subproc.c

@@ -151,6 +151,9 @@ subproc_check(int status, const char *desc, enum subproc_flags flags)
 			    desc, strsignal(n),
 			    desc, strsignal(n),
 			    WCOREDUMP(status) ? _(", core dumped") : "");
 			    WCOREDUMP(status) ? _(", core dumped") : "");
 	} else {
 	} else {
+		if (flags & SUBPROC_RETERROR)
+			return -1;
+
 		out(_("subprocess %s failed with wait status code %d"), desc,
 		out(_("subprocess %s failed with wait status code %d"), desc,
 		    status);
 		    status);
 	}
 	}