+2008-06-28 Guillem Jover <guillem@debian.org>
+
+ * lib/mlib.c (checksubprocerr): Move the PROCNOERR check before
+ the reporting, and exit directly instead in case of error.
+
2008-06-28 Guillem Jover <guillem@debian.org>
* lib/ehandle.c (badusage): Use ohshit instead of its own error
int n;
if (WIFEXITED(status)) {
n= WEXITSTATUS(status); if (!n) return n;
- if(!(flags & PROCNOERR)) {
- if(flags & PROCWARN)
- fprintf(stderr, _("dpkg: warning - %s returned error exit status %d\n"),description,n);
- else
- ohshit(_("subprocess %s returned error exit status %d"),description,n);
- }
+ if (flags & PROCNOERR)
+ return -1;
+ if (flags & PROCWARN)
+ fprintf(stderr, _("dpkg: warning - %s returned error exit status %d\n"),
+ description, n);
+ else
+ ohshit(_("subprocess %s returned error exit status %d"), description, n);
} else if (WIFSIGNALED(status)) {
n= WTERMSIG(status); if (!n || ((flags & PROCPIPE) && n==SIGPIPE)) return 0;
if (flags & PROCWARN)