Re: execline: accessing LASTEXITCODE environment variable

From: Patrick Mahoney <pat_at_polycrystal.org>
Date: Tue, 19 Aug 2014 22:14:12 -0500

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

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC