[M3devel] m3cc often succeeds when it should fail

Jay K jay.krell at cornell.edu
Fri Aug 27 09:19:59 CEST 2010


We could introduce a new quake feature..
if defined("set_pipefail")
  set_pipefail()
end
q_exec()
?

 - Jay

----------------------------------------
> From: jay.krell at cornell.edu
> To: m3devel at elegosoft.com
> Date: Fri, 27 Aug 2010 07:01:57 +0000
> Subject: [M3devel] m3cc often succeeds when it should fail
>
>
> I finally looked into this.
>
> The reason is that the exit code of a pipeline is the last command.
> Seems kind of dumb and I don't like any of the options.
> I like having tee in there to save a log.
>
> There is a way to deal it with bash, zsh, and it takes a big function to do it in standard sh.
>
> Maybe q_exec or m3_exec?
> It looks like no.
>
> I suppose we could wrap up everything in a .sh file, detect bash 3 or newer, and use set -o pipefail?
>
>  - Jay
>
 		 	   		  


More information about the M3devel mailing list