Only forward signals when appropriate; on SIGTSTP suspend parent too.
Finish the main.py work, started in
aa6f2c87e6f1292f1fa22f618532b65a5565d604, which began forwarding
SIGTSTP and SIGCONT to the child process so that it would
suspend/resume with the parent.
Only forward signals to the child when appropriate -- guarded by p and
forward_signals. After forwarding SIGTSTP (as SIGSTOP) to the child,
reset the SIGTSTP handler to its default behavior and re-send SIGTSTP
to the parent so that it will actually suspend too.
Thanks to Karl Kiniger <karl.kiniger@med.ge.com> for reporting the
problem.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>