A simpler test is
s=bash
$s -c 'echo $$; '$s' -c "for f in 1 2 3; do echo \$\$ \$PPID; sleep 1;
done" & sleep 1; echo exit'
That shows the behaviour described above for bash and zsh. Given Jilles
says POSIX demands it I don't think this is a bug. If you think bash(1)
man page can be cl
POSIX says PPID should be set once at shell initialization, and I have
not seen a shell which does otherwise.
--
Bash PPID is wrong when parent terminates
https://bugs.launchpad.net/bugs/340571
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubun
** Attachment added: "SleepTest.sh"
http://launchpadlibrarian.net/23723854/SleepTest.sh
--
Bash PPID is wrong when parent terminates
https://bugs.launchpad.net/bugs/340571
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bu