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

Re: exec problem



* x x <pbyrne76@xxxxxxxxxxx> [2002-11-26 17:41:47 +0000]:
> But zsh doesn't do what the user says and certainly
> isn't doing what he wants. From a users perspective
> an exec has two parts:
> 1. run a new command without forking
> 2. terminate the shell

  My understanding of what exec does must be incomplete then.  I thought
the function of exec was to replace the current shell with a command, in
which case, the shell is already terminated before any actual execution
of the <command> happens.  Is this not how it works?  Or did you
specifically say "from a user's perspective" for a reason? :) If
that's the case, then I don't think the "correct" behaviour should be
changed (to suit users who disagree); the fix for that is to educate the
users.  In this case, the result of the education may be to use your
script, which does the job of providing the behaviour those users are
looking for very well.

> Since zsh cannot complete the first part it should not try to
> do the second. More generally if a composite action is composed
> of several steps, each of which must be completed in order
> for the composite to be completed, then an exception should
> be generated if any step fails causing the complete action
> to fail gracefully.

  Agree.

-- 
------------------------------------------------------------------------
 John Buttery

        If you can't live without me, why aren't you dead yet?

                                     (Web page temporarily unavailable)
------------------------------------------------------------------------

Attachment: pgp0vOCC3HWj5.pgp
Description: PGP signature



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