This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Return codes and pipelines
- From: "Rolf Campbell" <rcampbell at tropicnetworks dot com>
- To: <cygwin at cygwin dot com>
- Date: Sun, 12 Jan 2003 17:09:55 -0500
- Subject: Return codes and pipelines
/home/rcampbell> (true | true) && echo true || echo false
true
/home/rcampbell> (true | false) && echo true || echo false
false
/home/rcampbell> (false | true) && echo true || echo false
true
/home/rcampbell> (false | false) && echo true || echo false
false
The third test above yields different results when run on Linux. I'm
wondering if this was the desired result or not? (This is not a new
problem, it's been around for at least a year of releases). It makes
some makefiles not work as expected, specifically, the GCC manual
describes how to perform auto-dependency analysis like:
gcc ... | sed ...
But, if gcc fails, sed will still work, thus make will not consider it a
failure and will continue.
I know there are many ways to avoid this specific problem, already
implemented one. Just wanted to let you guys know.
-Rolf Campbell
Software Designer
Tropic Networks