[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: install.c: fix obscure compile-time failure on Linux
From: |
Andreas Schwab |
Subject: |
Re: install.c: fix obscure compile-time failure on Linux |
Date: |
Fri, 23 Mar 2007 17:22:29 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> diff --git a/src/install.c b/src/install.c
> index 8fc6a8a..0457751 100644
> --- a/src/install.c
> +++ b/src/install.c
> @@ -566,11 +566,10 @@ strip (char const *name)
> 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"));
That mishandles EINTR.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."