nsupdate exit codes

Daniel Rudy nospam at nospam.net
Thu May 19 19:28:09 UTC 2005


At about the time of 5/19/2005 11:49 AM, Bill Larson stated the following:

> On May 19, 2005, at 12:14 PM, Daniel Rudy wrote:
> 
> 
>>What are the exit codes and their meanings for nsupdate?  I'm unable to
>>find any documentation on these codes.
> 
> 
> I wrote a reply up to send you and then found that your email address 
> from your previous posting was "nospam at nospam.net".  If you don't want 
> replies to your postings, then don't post.

I didn't realize that this newsgroup and the mailing list was linked.
My first post was to the newsgroup, which is why the posting is from
"nospam at nospam.net", like this message.  My second post was on the
mailing list, which is from a valid e-mail address.  Imagine my suprize
when my mailing list posting showed up in the newsgroup.  My appologies
for the confusion.

> The documentation for the exit results can be found in the source code 
> for nsupdate itself.  Look for the "exit" calls used anywhere, which 
> abort the execution, and the "return" calls made in the "main{};" 
> program section, which will cause the program to exit.  This isn't a 
> difficult program to try and read.
> 
> The exit values appear to be:
> 
> 	0:	No error
> 	1:	"nsupdate" calling error
> 	2:	DDNS protocol error
> 
> For all failures of "nsupdate", exit codes 1 or 2, there is an 
> associated message sent to standard error that should provide further 
> information as to what the actual failure was.
> 
> Since these result codes aren't "documented", I would suggest that you 
> not rely upon the exit value other than a zero meaning success and a 
> non-zero meaning failure.  You can use the failure message written to 
> stderr to identify exactly what the problem was.
> 
> If you try and distinguish between the non-zero, failure, exit codes 
> you may be disappointed when a future version of nsupdate changes the 
> meaning of these values or adds an addition value.
> 
> Bill Larson
> 
> 

I see, so I will need to capture the output to see what the failure is.

Well, that answers my question.

Thank you.
-- 
Daniel Rudy

Email address has been encoded to reduce spam.
Remove all numbers, then remove invalid, email, no, and spam to reply.



More information about the bind-users mailing list