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.
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