Re: PATCH: subshell into a new process group
Bart Schaefer <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <CAH+w=7ZujXuY1z9RV_L7CFzdqH7rBmZF+wBksWzBm16EAHGs-w@mail.gmail.com> |
On Fri, May 8, 2026, 9:16 PM Anthony Heading <[email protected]> wrote: > Hi, > > I have found this feature useful to allow signals to be sent to precisely > bounded subshell trees. I couldn't find any existing way to achieve it Not at a shell right now but I'm pretty sure the way to do this is ( print this is a new pgrp ) &! You just have to capture the value of $! and use that PID for signaling the new group. There's no point in keeping the subshell as a bg job because you'll get TTIN/TTOU signals if fg'd.