This is a limitation of the OS.  On Unix and Linux, the largest return 
code value that you can have is 255. Anything over 255 causes the return 
code to be "rolled over".

You can see this by running a simple shell script on your Linux system:

> cat test.sh
#!/bin/sh
exit 4002

> ./test.sh
> echo $?
162

David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com




"jander...@talentex.co.uk" <jander...@talentex.co.uk> 
05/05/2009 04:53 AM

To
staf <staf-users@lists.sourceforge.net>
cc

Subject
[staf-users] Return codes in Linux?






I have a curious problem, but I am not sure if it is me or STAF, I 
defined three new return codes, 4001, 4002, 4003, but they are not 
returned correctly to the shell (ksh):

# infares request resname tut
Error submitting request, RC: 7
Additional info
---------------
You must have at least 1, but no more than 1 of the option(s), RESTYPE
# echo $?
7

- this one comes back OK, perhaps because it is a low value? But:

# infares request restype % resname tut
Error submitting request, RC: 4002
Additional info
---------------
No free resources found

# echo $?
162

It looks like the shell only accepts 1 byte return codes? But ksh is 
used universally - surely it would have been caught already?

/jan

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK 
i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to