Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: subshell into a new process group



On Fri, May 8, 2026, 9:16 PM Anthony Heading <ajrh@xxxxxxxx> 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.


Messages sorted by: Reverse Date, Date, Thread, Author