in reply to Re^2: Killing process group run with IPC::Open3
in thread Killing process group run with IPC::Open3
So I ran a few tests. It seems that the child can't read from the parent's STDIN. I presume this is the problem to which you are referring.
man 2 setpgrp explains
At any time, one (and only one) of the process groups in the session can be the foreground process group for the terminal; the remaining process groups are in the background.
I don't know what a session is, but adding setsid() appears to solve the problem.