Considering a scenario where a Parent program (could be a C++ program or a Shell Script) executes a Child shell script, when we hit Control+C (or whatever character is configured to be the INTR character) while the Child Shell Script is executing, a SIGINT is sent to all processes in the foreground process group. This includes the parent process.
Source : POSIX.1-2008 XBD section 11.1.9
Is there a way to override this default behavior? That the CHILD Process alone handles the SIGNAL without it propagating to the parent?
Reference : Stack Overflow Post - Parent Process not Completing when Child is Interrupted (TRAP INT)Stack Overflow Post - Parent Process not Completing when Child is Interrupted (TRAP INT)