Feature Request: PID writeout on background

Darren Tucker dtucker at dtucker.net
Wed Oct 28 17:02:06 AEDT 2020


On Wed, 28 Oct 2020 at 16:47, Lars Noodén <lars.nooden at gmx.com> wrote:
[...]
> I notice that with -f the $! variable stays blank.

$! is the pid of the last process placed into the background by the
shell's job control.  From the shell's perspective, "ssh -f" runs in
the foreground briefly then exits (after forking a copy of itself to
run in the background, but that's not something the shell has
visibility into).  Shell job control is not involved, so $! is not
set.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list