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 43664
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: [Bug] Exiting shell from function called by trap handler always produces status 0
- Date: Tue, 9 Oct 2018 14:50:50 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181009135053euoutp020110187678f32e1632212f882df09eb4~b9PpCBGoS1318113181euoutp029
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539093053; bh=JDznPz+ZBw84uQaYNXxat9gONx9UTZ6AbC1uxJJoJEw=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Y/Hh6vkw83bvW8JSp5jeBPyFzLBw2uhSr8rZodSRWnkAslzdJqmovE8fMI3i2SNEt BtYYoZvggTEltAca2w48d3OTwbe0ksreLVxTpWGgmKOufbpfNQC5jwmfokCX84nSy1 1NHx0TWfUugoArrTVqFH0JYd3VKFvuxmxzw2cP+Q=
- In-reply-to: <1539092591.3286.12.camel@samsung.com>
- 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> <1539092351.3163513.1535891128.20DDCB34@webmail.messagingengine.com> <1539092591.3286.12.camel@samsung.com>
On Tue, 2018-10-09 at 14:43 +0100, Peter Stephenson wrote:
> On Tue, 2018-10-09 at 13:39 +0000, Daniel Shahaf wrote:
> > Peter Stephenson wrote on Tue, 09 Oct 2018 14:16 +0100:
> > A function-local 'static' (below) is implicitly initialized to 0, but
> > a non-static global is not implicitly initialized.
> If that's really the case then the entire shell (look around at other
> cases), and pretty much every other non-trivial programme I've ever
> written, is fundamentally broken. I'm not going to try to fix that now.
>
> I can't quote chapter and verse but in all interesting cases they're
> initialised to zero.
Looking around at some discussions of this subject on websites...
I wonder if you're getting confused between static and automatic
*allocation* vs. global and static *linkage*? Linkage has no effect
here: global variables are statically allocated.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author