Просмотр исходного кода

Removed an 'inlined' version of waitsubproc, and call the function instead.

Adam Heath лет назад: 25
Родитель
Сommit
f2caa007ea
2 измененных файлов с 6 добавлено и 12 удалено
  1. 5 0
      ChangeLog
  2. 1 12
      main/help.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Tue Jan  2 22:44:14 CST 2001 Adam Heath <doogie@debian.org>
+
+  * lib/help.c: Removed an 'inlined' version of waitsubproc, and call
+    the function instead.
+
 Mon Jan  1 02:07:47 CST 2001 Adam Heath <doogie@debian.org>
 
   * lib/varbuf.c, include/dpkg-db.h: Add varbufdupc().

+ 1 - 12
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"));