unix - How to Ctrl-Z in Perl script -
I am writing Perl script and I need to execute the Unix Ctrl-Z on the script. How do I do it in Perl Can i
Thank you.
You can do the process by sending a signal to processes with Pearl, which you can do with the Unix command line tool Similar is what works the same. Ctrl-Z is running equivalent
kill-SIGTSTP pid
You need to know what is the number of your TSTP signal on your system You can do this by running
kill -l TSTP
on the command line
20 => $$;
Update: As mentioned by daxim, You can skip the 'kill -l' part and provide the name of the signal directly:
kill 'TSTP' => $$;
Comments
Post a Comment