You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by Steve Loughran <st...@hortonworks.com> on 2012/09/13 11:18:46 UTC

are bash script return codes being checked?

While I've been debugging a service, I've added more checks to the code,
which will bail out the moment an operation fails.

mkdir $somedir || exit 1

I don't see that exit code being checked, not in subclasses of the hadoop
service. Is this right? Is there some property I can set to enable such
checks?

Re: are bash script return codes being checked?

Posted by Tom White <to...@cloudera.com>.
On Thu, Sep 13, 2012 at 10:18 AM, Steve Loughran <st...@hortonworks.com> wrote:
> While I've been debugging a service, I've added more checks to the code,
> which will bail out the moment an operation fails.
>
> mkdir $somedir || exit 1
>
> I don't see that exit code being checked, not in subclasses of the hadoop
> service. Is this right? Is there some property I can set to enable such
> checks?

I don't think there is. This sounds like a bug - can you open a JIRA
for it please?

Thanks,
Tom

Re: are bash script return codes being checked?

Posted by Steve Loughran <st...@hortonworks.com>.
On 13 September 2012 12:37, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Last time I checked, the exit code wasn't check.
>
>
Not just me then. I've filed a JIRA

https://issues.apache.org/jira/browse/WHIRR-653

Whereabouts in the code should I be looking for this?




> Regards
> JB
>
>
> On 09/13/2012 11:18 AM, Steve Loughran wrote:
>
>> While I've been debugging a service, I've added more checks to the code,
>> which will bail out the moment an operation fails.
>>
>> mkdir $somedir || exit 1
>>
>> I don't see that exit code being checked, not in subclasses of the hadoop
>> service. Is this right? Is there some property I can set to enable such
>> checks?
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: are bash script return codes being checked?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Last time I checked, the exit code wasn't check.

Regards
JB

On 09/13/2012 11:18 AM, Steve Loughran wrote:
> While I've been debugging a service, I've added more checks to the code,
> which will bail out the moment an operation fails.
>
> mkdir $somedir || exit 1
>
> I don't see that exit code being checked, not in subclasses of the hadoop
> service. Is this right? Is there some property I can set to enable such
> checks?
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com