Sample Header Ad - 728x90

Is it possible to force a program that ignores signals to quit on ctrl-C?

0 votes
1 answer
1874 views
I have a program that ignores SIGINT but that I want to run in the foreground. I would like to find a way to force it to close on Ctrl-C. Is there any way to write a wrapper (that you'd call ./wrapper.sh my_program) that would force the misbehaving program to quit, potentially by detecting the ignored SIGINT and generating a SIGKILL? [This answer](https://stackoverflow.com/a/21660539/3404377) is the exact opposite of what I am looking for -- I would like to force a program that ignores a signal to quit on SIGINT.
Asked by ddulaney (165 rep)
May 28, 2021, 08:27 AM
Last activity: May 30, 2021, 12:04 AM