I’m currently making a shell and i encounter trouble when it come to launch a processus that need to work in background, and when i press CTRL-C after the launch.
Basically all is working fine, but if i press CTRL-C while my forked-execvp process is running, even if i’ve handle the signal, CTRL-C is propaged to my child. I understand the reason of the propagation (signal send to all child related to the terminal if I have understood right)
The problem is as i saw in a previous topic related to my question, we can’t handle a signal when we do an exec just after.
So I’m asking to the community if there is anyway to handle this ctrl-c in my child (basically doing nothing) because i need to ask a confirmation in my father process before killing every background process.
Hope it’s clear, don’t hesitate to ask more information if there is any misunderstanding (sorry english isn’t my native language). Thanks