Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Bug] Exiting shell from function called by trap handler always produces status 0
- X-seq: zsh-workers 43668
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [Bug] Exiting shell from function called by trap handler always produces status 0
- Date: Wed, 10 Oct 2018 08:56:56 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:date:subject :references; s=fm1; bh=iVIv1wniQC8+4vjHYwA3Bc6kY6Ko5oT5L+WYGzoNy kk=; b=ZNDqaBdvRA3WqW5VVvNkEhYCgxE2NPtz6F/MtDaf2zjCthrXktxG7GtiX D78CzdWkaXKe7YR4HhGhWd9DsIjrmsYuxRwWALalZGyZJomSRbG8R8ihiOfZY/lL Ljx7qmD6+RER5nGAFUNUdhwSRSRHOKWa53ajyyChGX4UlI7M4327dgLcAL6GUYRg dk2gwPxjTa1VvZhNv4ojj+qlNp9YUj+sBcBkTHMS7dv4dOZi4uxvPiidy7iQLI50 y26ZUU7UHp1k6KMar1SA4G3A8rOT7rcXHO3vcT+t97ntfRkuOKevO8OzlU7tD5IY YxAWtfosKhJgCUQEN28sGF5aeOA9g==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=iVIv1wniQC8+4vjHYwA3Bc6kY6Ko5oT5L+WYGzoNy kk=; b=UQqXTgTNcrllqDV1Dv5oHkAy57i8zrcm84CJh2bUncMSWZXSN1rabJ9Ua 3Pla2zRfEI6Si0luRhW8JAosSA7RMzOYYa+NJ1xrbc73auq8OVhjBBxLXne+mFmn oWb/CMrJVD5uPH6VgTujxA0fh4NTZZxwIWQf7KVgT9ZUlCozzFXQEnq1C+zoDFqA l1+3Ytl3thXXqRdw3XSeX9CxVs+e3owZmkO5Km45K9m4eqNzreO0NQRrZf+d3bJ+ Dp5X1U5iyMFeRE+/Q6NEgWZWPhAuTYBu7pwKw1CluHxdvo+hpism828wIBZttDBb kfB18/+VlXaAnOex2+jqYOWxVyd+w==
- In-reply-to: <20181009210912.7a17eb77@pws-HP.localdomain>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20181009012624epcas1p44f2ae223f663713a980af4be735e5a3f@epcas1p4.samsung.com> <a5934536-7982-c434-d98d-2c07d66b0739@inlv.org> <20181009084918eucas1p27dedda10d51beb773ba9175967912d2c~b5IUtvcVK3037630376eucas1p2R@eucas1p2.samsung.com> <205ea5e4-4dc9-2ebf-9437-0822195e1a9a@inlv.org> <20181009131646eucas1p2eb07d8fa34e97de25db60d6a56c584a4~b8x2n0O1S2407324073eucas1p2z@eucas1p2.samsung.com> <20181009210912.7a17eb77@pws-HP.localdomain>
Peter Stephenson wrote on Tue, 09 Oct 2018 21:09 +0100:
> Here's a slight improvement --- we can "exit 0" even if the last command
> status is non-zero.
Can we add a test for this? I tried to write one but couldn't nail down
the behaviour that differed.
FWIW:
% Src/zsh -fc 'fn() { exit 0 }; trap fn EXIT; false' ; echo $?
1
% /usr/bin/zsh -fc 'fn() { exit 0 }; trap fn EXIT; false' ; echo $?
0
%
Messages sorted by:
Reverse Date,
Date,
Thread,
Author