Logins command exit status is 236 not 0

I have noticed that on version 11.23 I get exit status 236 from the
following command:

logins -oxl root ; echo $?
> 236

However on 11.31 I get the expected code 0

logins -oxl root ; echo $?
> 0

The output is correct for both versions and contains no error data.
Can anyone explain this ? Its causing problems with some automation
we are using which calls the logins command and check the exit status.

---------- Post updated 26-11-09 at 12:01 PM ---------- Previous update was 25-11-09 at 03:47 PM ----------

Update:
Further investigation as revealed this is hardware dependent.

IA64 with 11.23 OK exit code 0
IA64 with 11.31 OK exit code 0

RISC with 11.23 FAIL exit code 236 ******

IA64 with 11.31 OK exit code 0
RISC with 11.23 OK exit code 0

We still do not know why this is happening, still would love some
feedback if you can explain this..

the wait() system call returns the lowest 8 bits of the actual return code.
It is treated as if it were an "unsigned char" in effect. It is not. So, negative small numbers returned become return values > 127, for example. Think ~(return value), we saw this on migrating from 11.0 to HPUX 11.23 PA_RISC-2 boxes, running 32 bit mode code. The 11.0 code is binary compatible, so we did not recompile.

Create a hashed alias in /etc/profile: a shell script wrapper for logins. It masks the return value to zero or 1. We ran into other commands that do this as well.

Thanks that was very useful information. To round this off is there any HP formal documents describing this as working as designed ? or would a defect be an acceptable path.

Though the described work around is fine for me on the command line. We have discovered that the 3rd party software hangs with the workaround in place. So its likely the 3rd party needs to adjust the application or HP would need to return correct exit codes i.e '0' for success.