linux - Ctrl + C: does it kill threads too along with main process? -


while running thread program , repeatedly killing main program using ctrl + c, see unexpected results in program in second run. however, if let program run , voluntarily exit, there no issues.

so, doubt is, ctrl + c, kill threads along main process?

thanks in advance.

well, thing ctrl + c sending sigint one thread in process not masking signal. signals can handled or ignored.

if program does handle ctrl+c, usual behavior self-termination, once again, used else.

in case, sigint being received one thread, kill itself, not kill others.


Comments