mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-08 03:44:13 -04:00
52 lines
998 B
Plaintext
52 lines
998 B
Plaintext
$NetBSD: patch-ac,v 1.3 2002/01/09 11:24:37 jlam Exp $
|
|
|
|
--- src/looper.c.orig Wed Jul 28 14:45:08 1999
|
|
+++ src/looper.c
|
|
@@ -26,6 +26,7 @@
|
|
#include <stdlib.h>
|
|
#include <sys/wait.h>
|
|
#include "timeit.c"
|
|
+#include <sys/param.h>
|
|
|
|
unsigned long iter;
|
|
char *cmd_argv[28];
|
|
@@ -88,12 +89,34 @@
|
|
exit(2);
|
|
}
|
|
else
|
|
+ {
|
|
/* master */
|
|
wait(&status);
|
|
- if (status != 0)
|
|
- {
|
|
- printf("Bad wait status: 0x%x\n", status);
|
|
- exit(2);
|
|
+#if (defined(NetBSD) && (NetBSD < 199810))
|
|
+ /* NetBSD 1.3H and lower have a bug in dc */
|
|
+ if (strcmp(cmd_argv[0],"dc") != 0)
|
|
+ {
|
|
+ if (WIFSIGNALED(status))
|
|
+ {
|
|
+ printf("signaled: %d\n",WTERMSIG(status));
|
|
+ exit(2);
|
|
+ }
|
|
+ if (WIFEXITED(status))
|
|
+ {
|
|
+ if (WEXITSTATUS(status) != 0)
|
|
+ {
|
|
+ printf("Exit code: %d\n",WEXITSTATUS(status));
|
|
+ exit(2);
|
|
+ }
|
|
+ }
|
|
+ } /* NetBSD 1.3H */
|
|
+#else
|
|
+ if (status != 0)
|
|
+ {
|
|
+ printf("Bad wait status: 0x%x\n", status);
|
|
+ exit(2);
|
|
+ }
|
|
+#endif
|
|
}
|
|
iter++;
|
|
}
|