On 2014-08-19 9:46 pm, John Vogel wrote:
> #!/command/execlineb
> foreground { exit 122 }
> import LASTEXITCODE
> echo $LASTEXITCODE
>
> This just prints a blank line. What part of the concept am I missing
> here?
This is contrary to the documentation, but it appears to set
the environment variable '?', not LASTEXITCODE:
(execline 1.3.1.1)
execlineb -c 'foreground { exit 122 } printenv' | grep 122
?=122
--
Patrick Mahoney <pat_at_polycrystal.org>
Received on Wed Aug 20 2014 - 03:14:12 UTC