Clients do not exit with error codes other than 0.
Carter Bullard
carter at qosient.com
Mon Aug 17 12:28:58 EDT 2009
Hey Harry,
Well, they don't have to. From the routine ArgusLog(), we passed the
error priority to ArgusShutDown(),
if the priority suggested that we need to bail. Well, LOG_ERR, which
is the priority we would pass
when its really bad, is equal to 3, and so we would pass this value to
ArgusShutDown(), which happens
to equal SIGQUIT. I'd say this was a bug. With the patch below, it
will return -1.
==== //depot/argus/clients/common/argus_util.c#173 - /home/carter/
argus/clients/common/argus_util.c ====
550a551,554
>
> case -1:
> exit(sig);
> break;
556a561
>
17508c17514
< ArgusShutDown(priority);
---
> ArgusShutDown(-1);
Carter
On Aug 17, 2009, at 11:37 AM, Harry Bock wrote:
> Hi Carter,
>
> I was wondering why all clients in the argus-clients package return
> an exit code of 0, even when an error occurs (such as connecting to
> a client, for example). This makes it difficult to test for failure
> in scripts running Argus clients.
>
> Thanks,
> Harry
>
> --
> Harry Bock
> Software Developer, Package Maintainer
> OSHEAN, Inc.
> Email: harry at oshean.org
> PGP Key ID: 546CC353
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20090817/6dc0d287/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3815 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20090817/6dc0d287/attachment.bin>
More information about the argus
mailing list