I was trying to put the child process after fork() in the foreground process group, and I use setpgid() and tcsetpgrp() both in child process and parent process to avoid rac