On 8/16/22 1:58 PM, Xiami wrote:
The following script will likely failed to echo "Failed to exec" in 
non-interactive mode:
     #ls -l /proc/$$/fd
     shopt -s execfail
     exec notexistexecutable
     echo >&2 "Failed to exec"
     #ls -l /proc/$$/fd

exec_builtin will `goto failed_exec` after `search_for_command(args[0], 1)`
returns NULL, before `orig_job_control = job_control`, causing read
uninitialized orig_job_control in failed_exec code.

Thanks for the report.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to