From 19b723feccd9221ccdb7e7f9cd0fc56d767938cc Mon Sep 17 00:00:00 2001 From: hoek Date: Sat, 31 Jul 1999 20:38:22 +0000 Subject: [PATCH] When printing an error message after command execution fails, don't assume the only possible error is "command not found". This makes debugging of messages such as "/bin/sh: not found" less common... --- usr.bin/make/compat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 284e786c1e15..8424e9bfedfd 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: compat.c,v 1.11 1998/08/24 10:15:53 cracauer Exp $ + * $Id: compat.c,v 1.12 1998/09/09 05:15:38 jkoshy Exp $ */ #ifndef lint @@ -330,7 +330,9 @@ CompatRunCommand (cmdp, gnp) if (local) { execvp(av[0], av); (void) write (2, av[0], strlen (av[0])); - (void) write (2, ": not found\n", sizeof(": not found")); + (void) write (2, ":", 1); + (void) write (2, strerror(errno), strlen(strerror(errno))); + (void) write (2, "\n", 1); } else { (void)execv(av[0], av); }