Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird bug / missing feature with gvim interaction
On Mon, Mar 6, 2023 at 6:31 AM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> On Sun, Mar 5, 2023 at 10:28 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > What's not clear is where the HUP is coming from
> >
> > Puzzlingly, using "nohup xdg-open ..." doesn't help.
>
> That doesn't help, but "setsid nohup xdg-open ..." does help, both in
> bash and zsh. But I believe that's what the vim code essentially tried
> to do.
Sure, but vim is doing it before zsh starts up, whereas when you use
the setsid command it creates the new process group after zsh runs it.
E.g., without the setsid command, I believe the thread would be that
zsh execs nohup which execs xdg-open, all with no forking involved,
but if you add setsid in front then zsh execs setsid which forks
before exec of nohup.
Zsh doesn't use setsid(2) and doesn't mess with the process group by
any other means unless there's a controlling tty to attach to, which
there presumably is not in this case.
Still doesn't explain the source of the HUP signal, or why nohup fails
to ignore it ... unless xdg-open is deliberately unblocking it again.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author