zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Weird bug / missing feature with gvim interaction
Date: Sun, 5 Mar 2023 20:28:23 -0800	[thread overview]
Message-ID: <CAH+w=7Zc5BmmzvYxDFYYozNQKFGEHmdv7SNu9CE8Vb37QMwy=A@mail.gmail.com> (raw)
In-Reply-To: <CAMP44s2C8mGy_dsni6hW+Cgu-78iBo3FfftNZ0YP_HqwvbOaUg@mail.gmail.com>

On Sun, Mar 5, 2023 at 5:34 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:
>
> I've been investigating for a while a weird interaction with vim and
> zsh, and this is the closest I've gotten to narrowing down the
> problem.

Seems to be a race condition or similar, related to the fact that zsh
does an "exec" (without forking) of the very last external command
that it's asked to run, whereas bash and most shells always fork and
wait.

> 2. fork with setsid (the grandchilds are sent SIGHUP)

I believe there is no grandchild, because zsh has replaced itself with
xdg-open.  If I either run xdg-open under strace -f, or wrap it in
another script that runs
/bin/xdg-open "$@"; sleep 1
then it all works.

What's not clear is where the HUP is coming from, if you're right
about that signal.  If this were a tty ownership issue, I'd expect a
TTIN or TTOU.

Puzzlingly, using "nohup xdg-open ..." doesn't help.


  reply	other threads:[~2023-03-06  4:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06  1:32 Felipe Contreras
2023-03-06  4:28 ` Bart Schaefer [this message]
2023-03-06  4:32   ` Bart Schaefer
2023-03-06 14:31   ` Felipe Contreras
2023-03-06 19:35     ` Bart Schaefer
2023-03-06 19:47       ` Felipe Contreras
2023-03-06 15:14 ` lilydjwg
2023-03-06 15:54   ` Felipe Contreras

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='CAH+w=7Zc5BmmzvYxDFYYozNQKFGEHmdv7SNu9CE8Vb37QMwy=A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=felipe.contreras@gmail.com \
    --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).