At 08:12 PM 1/20/2006, Hallvard B Furuseth wrote:
On Unix, it can return 0-255 - but I think the range should be
at most 0-127, since shells tend to return 128 and up if the
process terminated due to a signal. Some code(s) will be needed
for error returns that do not come from LDAP protocol. And some
code(s) for protocol result codes outside the range of result
codes which can be handled this way - including when the server
returns the particular codes which we make use of this way.
FreeBSD exit(2)
Passing arbitrary values back to the environment as status is considered
bad style; you should use the values EXIT_SUCCESS and EXIT_FAILURE. If
portability is not a concern, you may use the values described in
sysexits(3).
On non-Unix, I have no idea... Hopefully someone else knows.