From 5c4fdbe903f5006eee3337a1b2c08c1cfe114191 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 10 Sep 2014 12:56:16 +0200 Subject: dpkg, dselect: Use subproc_wait_check() instead of ad-hoc code in call sites --- src/unpack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/unpack.c') diff --git a/src/unpack.c b/src/unpack.c index 943287d42..481a89db3 100644 --- a/src/unpack.c +++ b/src/unpack.c @@ -103,8 +103,8 @@ deb_reassemble(const char **filename, const char **pfilename) ohshite(_("unable to execute %s (%s)"), _("split package reassembly"), SPLITTER); } - status = subproc_wait(pid, SPLITTER); - switch (WIFEXITED(status) ? WEXITSTATUS(status) : -1) { + status = subproc_wait_check(pid, SPLITTER, PROCNOERR); + switch (status) { case 0: /* It was a part - is it complete? */ if (!stat(reasmbuf, &stab)) { @@ -120,7 +120,7 @@ deb_reassemble(const char **filename, const char **pfilename) /* No, it wasn't a part. */ break; default: - subproc_check(status, SPLITTER, 0); + internerr("unexpected exit status %d from %s", status, SPLITTER); } return true; -- cgit v1.2.3