Actually I am trying to create a password 🔑 protection for my terminal. Means when we start the terminal it will ask for password first.
But the problem is that if I press CTRL + z
then the password script will stop.
How to fix this.
HowtoFusion - Linux Howtos and Tutorials.
Actually I am trying to create a password 🔑 protection for my terminal. Means when we start the terminal it will ask for password first.
But the problem is that if I press CTRL + z
then the password script will stop.
How to fix this.
use trap
command:
trap 'printf "you can't do this"' SIGTSTP
Control+C sends SIGINT which will interrupt the application
Control+Z sends SIGTSTP