$ZEDITOR reflects exit status of the last ZEDIT
Final Release Note
$ZEDITOR reports the exit status of the last edit session invoked by a ZEDIT command. Previously, it reported 0 even if the editor invocation exited with a non-zero status. [#360 (closed)]
Description
Below is a test case that demonstrates the issue. By setting EDITOR env var temporarily to a script that exits with a non-zero status, one can see that $ZEDITOR does not match the exit status of the script.
> cat edit.csh
setenv EDITOR "tmp.csh"
echo "#\!/usr/local/bin/tcsh" > tmp.csh
echo "exit 250" >> tmp.csh
chmod +x tmp.csh
$ydb_dist/mumps -run ^%XCMD 'zwrite $zeditor zedit "x.m" zwrite $zeditor'
With r1.22 of YottaDB, this is what I see.
> source edit.csh
$ZEDITOR=0
$ZEDITOR=0
Clearly $ZEDITOR did not change even though the ZEDIT invocation exited with status of 250.
With the code fixed, this is what I expect to see.
> source edit.csh
$ZEDITOR=0
$ZEDITOR=250
Draft Release Note
$ZEDITOR holds the exit status of the last edit session invoked by a ZEDIT command. Previously, it used to hold the value of 0 even if the editor invocation exited with a non-zero status.