Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exec problem
- X-seq: zsh-users 5543
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: x x <pbyrne76@xxxxxxxxxxx>
- Subject: Re: exec problem
- Date: Tue, 26 Nov 2002 11:51:47 -0600
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <F79APNXRPmcarcR4ZDg00026268@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <F79APNXRPmcarcR4ZDg00026268@xxxxxxxxxxx>
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