I want to trap the SIGTSTP signal, but I'm not able to. When I call just
trap command without arguments, I'm getting this:
trap -- '' SIGTSTP trap -- '' SIGTTIN trap -- '' SIGTTOU
trap has some already pre-defined behaviour. The problem is, I'm not able to rewrite it, even when I'm logged as a root. When I use the
trap command, it's simply ignored for these three signals. Otherwise it works normally.
I tried to rewrite it just by command, like that:
trap -- 'echo SIGTSTP' SIGTSTP
The other strange thing is, I'm able to use this signals and they're working normally, they're not ignored. I can simply use SIGTSTP to stop working some other process and make it continue with SIGCONT again.
So, do you know, how to rewrite those commands? And could you, please, explain this strange behaviour a little?
My OS is Lubuntu 15.04 and I'm using GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu).