Subject: Re: make: print real reason for exec failure
To: None <tech-toolchain@netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-toolchain
Date: 05/28/2001 17:15:43
>Below are some of the changes I've recently made to bmake (autoconf'd
>version of netbsd make), that I think would be useful to add to our
>make.

While I'm at it, below is another change that might be useful:

--- compat.c    2001/04/06 11:13:46     1.32
+++ compat.c    2001/05/29 00:09:03
@@ -284,8 +284,7 @@
        Check_Cwd(av);
        if (local) {
            execvp(av[0], av);
-           (void) write (2, av[0], strlen (av[0]));
-           (void) write (2, ": not found\n", sizeof(": not found"));
+           perror(av[0]);
        } else {
            (void)execv(av[0], av);
        }

means you get errors like:

/bin/sh: Argument list too long 

instead of

/bin/sh: not found

which is not particularly helpful.

--sjg