diff options
author | hoek <hoek@FreeBSD.org> | 1999-07-31 20:38:22 +0000 |
---|---|---|
committer | hoek <hoek@FreeBSD.org> | 1999-07-31 20:38:22 +0000 |
commit | 19b723feccd9221ccdb7e7f9cd0fc56d767938cc (patch) | |
tree | 31a061b814db045d5971882c8316f68be663f582 /usr.bin | |
parent | 814ee99b5063cfddd39914f9dfc56cee92b34482 (diff) | |
download | FreeBSD-src-19b723feccd9221ccdb7e7f9cd0fc56d767938cc.zip FreeBSD-src-19b723feccd9221ccdb7e7f9cd0fc56d767938cc.tar.gz |
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...
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/compat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 284e786..8424e9b 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); } |