Re: ctrl z question



On May 30, 12:02 am, merrittr <merri...@xxxxxxxxx> wrote:
can I trap ctrl-z and displa a message??? this doesn't seem to work:
trap "echo You\'re trying to Control-z me" SIGTSTP

man bash
...........

SIGNALS
When bash is interactive, in the absence of any traps, it
ignores SIGTERM (so that kill 0 does not kill an interac-
tive shell), and SIGINT is caught and handled (so that the
wait builtin is interruptible). In all cases, bash
ignores SIGQUIT. If job control is in effect, bash ignores
SIGTTIN, SIGTTOU, and SIGTSTP.

.



Relevant Pages

  • Re: [RFC] page fault retry with NOPAGE_RETRY
    ... Suppose a program (let's call it "DoS") is written which sits in a loop ... bash will take a major fault, will submit a read and then it will do ... Particularly since every other program in the machine is stuck in disk wait ... having to kill off sshd, xinetd, httpd, etc isn't a very happy solution. ...
    (Linux-Kernel)
  • Re: [SLE] basic shell signal question
    ... > shell script? ... Send the processes named by PID the signal SIGSPEC. ... Kill is a shell ... Naturally, "man bash" would tell you this, as well. ...
    (SuSE)
  • Re: tty session leader issue (was Re: 2.6.25.3: su gets stuck for root)
    ... during the initialization of a new bash shell, ... All of my machines exhibit the ctrl-C being slower than ctrl-Z discussed ... elswhere (I've almost developed a habit of typing ctrl-Z kill %1 ). ... if this is the cause of dpkg recently not responding to ctrl-Z's? ...
    (Linux-Kernel)
  • Re: =?iso-8859-1?Q?variable=3DStrart=5FProgramPID =3F=3F?=
    ... > I wrote a bash script from which I call one c-program, that is mainly a loop. ... > But in the script I would like to be able to just kill the loop. ...
    (Debian-User)
  • Re: Viewing multiple .png files simultaneously
    ... kill "$!" ... bash: kill: `': not a pid or valid job spec ... In this case the quotes are needed; in other cases it doesn't hurt ...
    (comp.os.linux.development.apps)