I have a C program that uses forkpty to execute a bash shell.  I'm finding that the programs launched by this shell are launched with SIGINT ignored, so when I send a Ctrl-C to the shell they never close.example:int masterFd;char* args[] = {/bin/bash, -i, NULL };int procId = forkpty(&masterFd, NULL, NULL,  NULL);if( procId == 0 ){  execve( args[0], args, NULL);}else {   // Simple code that reads from standard in and writes to masterFd.     // I also register for Ctrl-C and write it to masterFd if caught}Other control characters seem to make it through, ctrl-D, ctrl-? etc.  However, whenever I look at the status of a process launched by the new bash shell it appears as if SIGINT is masked out.  MyShell:# sleep 1000StandardTerm:#  ps -ef | grep sleeproot    26611  19278  0  17:44  pts/1   00:00:00 sleep 1000root    26613  32376  0  17:44  pts/1   00:00:00 grep sleepStandardTerm:# grep Sig proc/26611/statusSigQ:    0/256428SigPnd:  0000000000000000SigBlk:  0000000000000000SigIgn:  0000000000010006   <- THE 6 IS THE PROBLEMSigCgt:  0000000180000000SigIgn has the 2 bit set, which means 2 (SIGINT) is ignored.  if I do the exact same thing, but run sleep (or cat a giant file or whatever) in a standard terminal, this bit is cleared.  What am I doing when I launch my pty bash that is causing it to create grandchildren programs with SIGINT ignored?Moreover, if I send a SIGINT signal to the processStandardTerm:# kill -2 26611nothing happens.  What's strange is when I send the same command to the bash shell I forkpty'ed IT works, because that bash shell is not ignoring SIGINT.
Bash shell launched by forkpty() spawns child processes that ignore SIGINT. Why and how do I ensure SIGINT is not ignored?
bash;shell;c;signals;pty