From: Jim Meyering Date: Tue, 30 Mar 1999 04:43:53 +0000 (+0000) Subject: (strip): Use standard "cannot fork" message. X-Git-Tag: FILEUTILS-4_0e~60 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=319976a665f5c023f8b5f2710f1ffacf074f84d3;p=platform%2Fupstream%2Fcoreutils.git (strip): Use standard "cannot fork" message. Check for strip nonzero exit status. --- diff --git a/src/install.c b/src/install.c index 0577e5d..e8872e4 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; } }