[M3devel] m3cc often succeeds when it should fail

Olaf Wagner wagner at elegosoft.com
Fri Aug 27 17:31:06 CEST 2010


Quoting Jay K <jay.krell at cornell.edu>:

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

Could you elaborate what exactly fails?
I don't think we should rely on bash3 or zsh or something else fancy.
I'm also not sure that we can easily implement it in quake.

The problem with pipelining logs through tee and losing result
values is a standard one, but has no canonical solution AFAIK.

More details would help,

Olaf

> ----------------------------------------
>> 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
>>
>



-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list