Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Jobs unexpectedly disowned
- X-seq: zsh-workers 44627
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Jobs unexpectedly disowned
- Date: Wed, 31 Jul 2019 14:25:27 +0000
- Accept-language: en-GB, en-US
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190731142529euoutp02624747c4ae0296fb7e44b77ce4b06a1e~2hBEpxtSC3056530565euoutp02b
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564583129; bh=aYpYyTNCty7G0ahioIxM0iEfIjWeR/M6ml9NucLqxZk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ERRm3CY40enziRUQoRptmqLbybyQhUkAA6cxEIyn7BgH3IzB9B4wdAhd6VXFxD055 h/hRxC/grCVpPvVrPY1gjjZKg5GzB4oqpxZX1+PIP+MCp2THcduQGieX/LUvFS7TFQ QMeT9L7YD9JNuvJkZkkHtHwef4J7EFOP08LID06Y=
- In-reply-to: <CAN=4vMp4pMM1JHKVYz9Wzr1N8qhwZ4auXGThFTkA-BFWHgvOyg@mail.gmail.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: <CGME20190721062030epcas2p2326b1b0c1779aba66272cc90656e2a29@epcas2p2.samsung.com> <CAN=4vMp4pMM1JHKVYz9Wzr1N8qhwZ4auXGThFTkA-BFWHgvOyg@mail.gmail.com>
- Thread-index: AQHVR6vMsgVC4NfOf0+ZY7NPUag4pg==
- Thread-topic: Jobs unexpectedly disowned
On Sun, 2019-07-21 at 08:19 +0200, Roman Perepelitsa wrote:
> I'm seeing weird behavior with jobs getting disowned and I'm not sure
> whether it's intended.
>
> function f2() { sleep 1 &; true }
> function g2() { f2; jobs; wait }
>
> echo g2; g2
>
> When ran from `zsh -df` I get this:
>
> g2
> [2] 31061
We're not seeing job information because STAT_NOPRINT is being or'ed into the
job status by this code within execpline().
if (list_pipe || (pline_level && !(how & Z_TIMED)))
jn->stat |= STAT_NOPRINT;
because pline_level is non-zero. I think it's non-zero just because
we're inside the shell function at this point, but I don't understand
why that's supposed to make a difference, and I haven't understood how
this point in the code gets hold of the background job which (although I
haven't checked) should be one started with Z_ASYNC by a lower level
call to execpline().
I think pline_level is really there for stuff inside non-final bits of
pipelines, but this stuff is a bit obscure. (No, really.)
I also haven't worked out what adding "true" has got to do with it, but
it does make the difference.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author