diff options
author | Jim Meyering <jim@meyering.net> | 1999-03-30 04:43:53 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-03-30 04:43:53 +0000 |
commit | 319976a665f5c023f8b5f2710f1ffacf074f84d3 (patch) | |
tree | c225ebe8b22ed75b2cd26fbb6edd8cc3690bb0f4 /src | |
parent | 8137487dd7ba4bccfdbcefd5f885eb4f1222b069 (diff) | |
download | coreutils-319976a665f5c023f8b5f2710f1ffacf074f84d3.tar.xz |
(strip): Use standard "cannot fork" message.
Check for strip nonzero exit status.
Diffstat (limited to 'src')
-rw-r--r-- | src/install.c | 7 |
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; } } |