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 thatmysql
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?
mysql
is in the same process group as the Perl script, the Perl script will ignore it andmysql
won't. – Andy Dalton Jan 24 '20 at 19:58