The following commit has been merged in the master branch:
commit ad95ee210312c38c12c6054e13dd45c1a8ff1c6c
Author: Guillem Jover <[email protected]>
Date: Thu Jan 20 18:26:26 2011 +0100
dselect: Use subproc_check in falliblesubprocess instead of ad-hoc code
diff --git a/dselect/method.cc b/dselect/method.cc
index a2107ed..b7cd441 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -156,26 +156,12 @@ falliblesubprocess(struct command *cmd)
pop_cleanup(ehflag_normaltidy);
- if (WIFEXITED(status) && !WEXITSTATUS(status)) {
+ fprintf(stderr, "\n");
+ i = subproc_check(status, cmd->name, PROCWARN);
+ if (i == 0) {
sleep(1);
return urqr_normal;
}
- fprintf(stderr, "\n%s ", cmd->name);
- if (WIFEXITED(status)) {
- i= WEXITSTATUS(status);
- fprintf(stderr,_("returned error exit status %d.\n"),i);
- } else if (WIFSIGNALED(status)) {
- i= WTERMSIG(status);
- if (i == SIGINT) {
- fprintf(stderr,_("was interrupted.\n"));
- } else {
- fprintf(stderr,_("was terminated by a signal: %s.\n"),strsignal(i));
- }
- if (WCOREDUMP(status))
- fprintf(stderr,_("(It left a coredump.)\n"));
- } else {
- fprintf(stderr,_("failed with an unknown wait return code %d.\n"),status);
- }
fprintf(stderr,_("Press <enter> to continue.\n"));
m_output(stderr, _("<standard error>"));
do { c= fgetc(stdin); } while ((c == ERR && errno==EINTR) || ((c != '\n') &&
c != EOF));
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]