diff options
author | bde <bde@FreeBSD.org> | 1996-09-12 03:03:25 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-12 03:03:25 +0000 |
commit | 5639f058b910faaa2f8afe769fa88bd59dd16906 (patch) | |
tree | 8c8030335ccf9f36a7353d7c9f151a0570d74716 /usr.bin/make | |
parent | 073456f615cf9735519fcc776078c9db2518e3aa (diff) | |
download | FreeBSD-src-5639f058b910faaa2f8afe769fa88bd59dd16906.zip FreeBSD-src-5639f058b910faaa2f8afe769fa88bd59dd16906.tar.gz |
Fixed handling of `!=' assignment. Don't warn if the shell's output is
null, but warn if there was an error reading it.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/parse.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index b0454a6..f99f186 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1428,17 +1428,18 @@ Parse_DoVar (line, ctxt) while(((pid = wait(&status)) != cpid) && (pid >= 0)) continue; - res = (char *)Buf_GetAll (buf, &cc); - Buf_Destroy (buf, FALSE); - - if (cc == 0) { + if (cc == -1) { /* - * Couldn't read the child's output -- tell the user and - * set the variable to null + * Couldn't read all of the child's output -- tell the user + * but still use whatever we read. Null output isn't an + * error unless there was an error reading it. */ Parse_Error(PARSE_WARNING, "Couldn't read shell's output"); } + res = (char *)Buf_GetAll (buf, &cc); + Buf_Destroy (buf, FALSE); + if (status) { /* * Child returned an error -- tell the user but still use |