2016-09-28 14:10 GMT-03:00 Richard Hamilton <[email protected]>:
> Given the description of wait(2), only exit codes 0-255 will be fully
> available to the parent.  Higher values may act oddly, although I'd suppose
> it's the application (ksh, in this case) rather than the OS that's
> responsible for such strange results.
>
> What I see about the exit builtin command in the ksh man page that's
> relevant is:
>
>       The value of a simple-command is its exit status;  0-255  if
>        it  terminates  normally;  256+signum  if it terminates abnormally
> (the
>        name of the signal corresponding to the exit status can be obtained
> via
>        the -l option of the kill built-in utility).
>
> and
>
>        - exit [ n ]
>               Causes  the  shell  to exit with the exit status specified by
> n.
>               The value will be the least significant 8 bits of the
> specified

  Indeed. I added some extra information about it at:

https://bugzilla.redhat.com/show_bug.cgi?id=1369571

>               status.   If  n  is omitted, then the exit status is that of
> the
>               last command executed.  An end-of-file will also cause the
> shell
>               to  exit  except for a shell which has the ignoreeof option
> (see
>               set below) turned on.
>
> In your case, it seems to me that it is NOT properly masking off the value
> given to the exit command, so that only the low 8 bits are acted on and made
> available to the parent.

Thanks!
Paulo
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to