Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: exec problem



In the last episode (Nov 26), x x said:
> In 4.0.4 when I issue an 'exec' and zsh can't find the executable it
> simply terminates without warning. This is surly not desirable
> behaviour.
> 
> In bash the shell first checks to see if the command is available and
> executable and if not it issues an appropriate error message. The
> following function approximates the bash bahaviour.

I think bash is in the minority here (and also seems to be wrong when
run as /bin/sh).  Bourne sh, ksh, zsh, and ash all exit the shell on
exec failure.  See
http://www.opengroup.org/onlinepubs/007904975/utilities/exec.html for
the X/Open description of the exec command.

-- 
	Dan Nelson
	dnelson@xxxxxxxxxxxxxxx




Messages sorted by: Reverse Date, Date, Thread, Author