* src/install.c (strip): Use waitpid, not wait. It's equivalent,
but feels less obsolescent.
2007-03-17 Jim Meyering <jim@meyering.net>
+ Avoid an obscure build failure, prefer waitpid over wait.
+ * src/install.c (strip): Use waitpid, not wait. It's equivalent,
+ but feels less obsolescent.
+
* bootstrap: Don't use \> in grep regexp. For HP-UX.
2007-03-16 Jim Meyering <jim@meyering.net>
error (EXIT_FAILURE, errno, _("cannot run strip"));
break;
default: /* Parent. */
- /* Parent process. */
- while (pid != wait (&status)) /* Wait for kid to finish. */
- /* Do nothing. */ ;
- if (status)
- error (EXIT_FAILURE, 0, _("strip failed"));
+ if (waitpid (pid, &status, 0) < 0)
+ error (EXIT_FAILURE, errno, _("waiting for strip"));
+ else if (! WIFEXITED (status) || WEXITSTATUS (status))
+ error (EXIT_FAILURE, 0, _("strip process terminated abnormally"));
break;
}
}