From: Greg Klanderman <greg@klanderman.net>
To: zsh-workers@zsh.org
Subject: Re: zpty intermediate zsh process?
Date: Tue, 09 Feb 2021 12:43:37 -0500 [thread overview]
Message-ID: <87o8gt2l2u.fsf@lwm.klanderman.net> (raw)
In-Reply-To: <87v9b22ia1.fsf@lwm.klanderman.net> (Greg Klanderman's message of "Mon, 08 Feb 2021 19:31:50 -0500")
>>>>> On February 8, 2021 Greg Klanderman <gak@klanderman.net> wrote:
>>>>> On February 6, 2021 Bart Schaefer <schaefer@brasslantern.com> wrote:
>> On Sat, Feb 6, 2021 at 10:21 AM Greg Klanderman <gak@klanderman.net> wrote:
>>>
>>> I can prefix the command with 'exec' to avoid that, but looking at the
>>> code in zpty.c, maybe the execode() call should just be setting the
>>> (third) 'exiting' argument to true?
>> That doesn't seem to cause any of the tests to fail, but I wonder
>> about side effects when traps are enabled, especially the EXIT trap.
> Hmm interesting, hadn't considered but I suppose the pty might even
> just be executing zsh code.. I suppose this is not worth changing if
> it might break desirable behavior.
>> Maybe just passing !sigtrapped[SIGEXIT] as the third argument would
>> suffice ... or maybe the handling of that trap by zpty is already
>> iffy.
> Reading zexit(), I suppose also "zshexit" and "zshexit_functions".
> What is
> runhookdef(EXITHOOK, NULL);
> ?
Relatedly, how would you feel about zpty returning the pid of the new
process in $!, like the zsh/clone module does?
Looks like it should just require adding
| lastpid = pid;
somewhere after the brace closing 'else if (!pid) { ...'
Greg
prev parent reply other threads:[~2021-02-09 17:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 18:21 Greg Klanderman
2021-02-06 21:53 ` Bart Schaefer
2021-02-09 0:31 ` Greg Klanderman
2021-02-09 17:43 ` Greg Klanderman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8gt2l2u.fsf@lwm.klanderman.net \
--to=greg@klanderman.net \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).