From: Adam Heath Date: Wed, 3 Jan 2001 04:46:25 +0000 (+0000) Subject: Removed an 'inlined' version of waitsubproc, and call the function instead. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2caa007eabc388dbebf74fa74c4135a9566335c;p=dpkg Removed an 'inlined' version of waitsubproc, and call the function instead. --- diff --git a/ChangeLog b/ChangeLog index 6cfcd87f..018a8061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 2 22:44:14 CST 2001 Adam Heath + + * lib/help.c: Removed an 'inlined' version of waitsubproc, and call + the function instead. + Mon Jan 1 02:07:47 CST 2001 Adam Heath * lib/varbuf.c, include/dpkg-db.h: Add varbufdupc(). diff --git a/main/help.c b/main/help.c index 9653ea94..2762aeb3 100644 --- a/main/help.c +++ b/main/help.c @@ -363,19 +363,8 @@ int maintainer_script_alternative(struct pkginfo *pkg, ohshite(_("unable to execute %s"),buf); } script_catchsignals(); /* This does a push_cleanup() */ - while ((r= waitpid(c1,&status,0)) == -1 && errno == EINTR); - if (r != c1) ohshite(_("wait for %s failed"),buf); + waitsubproc(c1,buf,0); pop_cleanup(ehflag_normaltidy); - if (WIFEXITED(status)) { - n= WEXITSTATUS(status); if (!n) return 1; - fprintf(stderr, _("dpkg: warning - %s returned error exit status %d\n"),buf,n); - } else if (WIFSIGNALED(status)) { - n= WTERMSIG(status); - fprintf(stderr, _("dpkg: warning - %s killed by signal (%s)%s\n"), - buf, strsignal(n), WCOREDUMP(status) ? ", core dumped" : ""); - } else { - ohshit(_("%s failed with unknown wait status code %d"),buf,status); - } ensure_diversions(); } fprintf(stderr, _("dpkg - trying script from the new package instead ...\n"));