summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-30 04:43:53 +0000
committerJim Meyering <jim@meyering.net>1999-03-30 04:43:53 +0000
commit319976a665f5c023f8b5f2710f1ffacf074f84d3 (patch)
treec225ebe8b22ed75b2cd26fbb6edd8cc3690bb0f4
parent8137487dd7ba4bccfdbcefd5f885eb4f1222b069 (diff)
downloadcoreutils-319976a665f5c023f8b5f2710f1ffacf074f84d3.tar.xz
(strip): Use standard "cannot fork" message.
Check for strip nonzero exit status.
-rw-r--r--src/install.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/install.c b/src/install.c
index 0577e5d18..e8872e43e 100644
--- a/src/install.c
+++ b/src/install.c
@@ -559,13 +559,12 @@ static void
strip (const char *path)
{
int status;
- pid_t pid;
+ pid_t pid = fork ();
- pid = fork ();
switch (pid)
{
case -1:
- error (1, errno, _("fork system call failed"));
+ error (1, errno, _("cannot fork"));
break;
case 0: /* Child. */
execlp ("strip", "strip", path, NULL);
@@ -575,6 +574,8 @@ strip (const char *path)
/* Parent process. */
while (pid != wait (&status)) /* Wait for kid to finish. */
/* Do nothing. */ ;
+ if (status)
+ error (1, 0, _("strip failed"));
break;
}
}