[Aide] Exit Code Questions

Eric Webster ewebster at 2co.com
Tue Dec 19 21:35:04 EET 2006


We have a internally made web app to manage our AIDE runs. It was spitting
these errors since it used to just check for a non-zero exit code such as:

    if ( $self->{'cmpresults'} =~ /^WARNING|^ERROR/ || $self->{'cmprc'} != 0
) {

I think it would be easier if we just checked like this now:

    unless ( $self->{'cmpresults'} =~ /^WARNING|^ERROR/ || $self->{'cmprc'}
=~ /1[4-8]/ )

>From the AIDE man page, I gather those are the only errors we should care
about.

Eric Webster
Enterprise Services
2CheckOut.com 

 

> -----Original Message-----
> From: aide-bounces at cs.tut.fi [mailto:aide-bounces at cs.tut.fi] 
> On Behalf Of Marc Haber
> Sent: Friday, December 15, 2006 4:15 AM
> To: Aide user mailinglist
> Subject: Re: [Aide] Exit Code Questions
> 
> On Thu, Dec 14, 2006 at 02:48:56PM -0500, Eric Webster wrote:
> > Just curious how these new codes work. On all of our scans 
> that had files
> > change/added/deleted we have an exit code of 1280. 
> > 
> > The man page shows:
> > 
> >        1 * (new files detected?)     +
> > 
> >        2 * (removed files detected?) +
> > 
> >        4 * (changed files detected?)
> > 
> > 
> > So how are we getting 1280?
> 
> This is 5 shifted left by 8. For example, perl's system() call returns
> the exit code of the called program shifted left by 8, see perldoc -f
> system.
> 
> I suspect that other languages might do the same.
> 
> Greetings
> Marc
> 
> -- 
> --------------------------------------------------------------
> ---------------
> Marc Haber         | "I don't trust Computers. They | 
> Mailadresse im Header
> Mannheim, Germany  |  lose things."    Winona Ryder | Fon: 
> *49 621 72739834
> Nordisch by Nature |  How to make an American Quilt | Fax: 
> *49 621 72739835
> _______________________________________________
> Aide mailing list
> Aide at cs.tut.fi
> https://mailman.cs.tut.fi/mailman/listinfo/aide
> 



More information about the Aide mailing list