From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4354 invoked from network); 26 Nov 2002 18:38:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Nov 2002 18:38:33 -0000 Received: (qmail 18693 invoked by alias); 26 Nov 2002 18:38:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5545 Received: (qmail 18672 invoked from network); 26 Nov 2002 18:38:10 -0000 Date: Tue, 26 Nov 2002 12:38:07 -0600 From: John Buttery To: zsh-users@sunsite.dk Subject: Re: exec problem Message-ID: <20021126183807.GB32232@io.com> Mail-Followup-To: zsh-users@sunsite.dk References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aVD9QWMuhilNxW9f" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Files: The Truth is Out There X-Message-Flag: Outlook/Eudora users: This is an email with a standards-compliant crypto signature. Blame Microsoft/Qualcomm if they mangle it. X-PGP-Keyid: 0x587F0CD702368857 X-PGP-Fingerprint: 947F E6B0 EFBA D239 0881 50A0 587F 0CD7 0236 8857 --aVD9QWMuhilNxW9f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * x x [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 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. --=20 ------------------------------------------------------------------------ John Buttery If you can't live without me, why aren't you dead yet? (Web page temporarily unavailable) ------------------------------------------------------------------------ --aVD9QWMuhilNxW9f Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) iD8DBQE947+PWH8M1wI2iFcRAiadAJ9krI5ZFZkfPVxp6qyOexqZrQmjywCcC77U pu6iWRmRDtqUMYwv7bIcNls= =oK5k -----END PGP SIGNATURE----- --aVD9QWMuhilNxW9f--