nsupdate exit codes
Bill Larson
wllarso at swcp.com
Thu May 19 18:49:46 UTC 2005
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.
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
More information about the bind-users
mailing list