Exec reporting incorrect exit code
Created by: dvkt
Tested this on Mac and Linux, seems like the exit code is getting misreported:
$ cat report.ldpl
DATA:
code is number
PROCEDURE:
execute "sh bad.sh" and store exit code in code
display "exit code: " code crlf
$ cat bad.sh
#!/bin/sh
exit 1
$ ldpl report.ldpl
LDPL: Compiling...
* File(s) compiled successfully.
* Saved as report-bin
$ ./report-bin
exit code: 256
$ sh bad.sh
$ echo "exit code: $status"
exit code: 1