Przeglądaj źródła

libdpkg: Also return an error code for unhandled subprocess status

Guillem Jover 11 lat temu
rodzic
commit
b097b5cf5d
1 zmienionych plików z 3 dodań i 0 usunięć
  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),
 			    WCOREDUMP(status) ? _(", core dumped") : "");
 	} else {
+		if (flags & SUBPROC_RETERROR)
+			return -1;
+
 		out(_("subprocess %s failed with wait status code %d"), desc,
 		    status);
 	}