How do I replace the default SIGINT handler when using sigaction? How do I replace the default SIGINT handler when using sigaction? unix unix

How do I replace the default SIGINT handler when using sigaction?


Are you using cargo run to run your program? If so, it sounds like your program is handling the SIGINT signal and instead cargo is being killed. Since cargo doesn't have any special handling it is being killed by the signal, thus ending your program.