Sample Header Ad - 728x90

Prevent SIGINT from reaching mysql subprocess

1 vote
1 answer
416 views
I have a perl script, which indirectly invokes mysql (to execute a long SQL script). I would like to disable Ctrl+C while that script is running, but somehow the signal still reaches mysql, which then says "Ctrl-C -- query killed. Continuing normally." (I believe that's from mysql) I have: * set the $SIG{INT} to 'IGNORE' -- indeed, the Perl script keeps running * set a process group on the Perl script -- indeed, ps -e -o uid,pid,ppid,pgid,command shows that mysql is in the same process group as my Perl script * mysql is invoked after both of those happened. Why would that signal still arrive at the mysql process, and how do I prevent that?
Asked by Johannes Ernst (163 rep)
Jan 24, 2020, 07:39 PM
Last activity: Feb 1, 2020, 06:11 AM