Discussion: ctrl z question
Afficher un message
Vieux 03/06/2007, 21h57   #4
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ctrl z question

In article <1180846807.342313.161110@j4g2000prf.googlegroups. com>,
merrittr <merrittr@gmail.com> wrote:

> On May 31, 1:15 pm, "Jose H." <jose...@gmail.com> wrote:
> > On May 30, 12:02 am, merrittr <merri...@gmail.com> 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.

>
> ok
> SIGSTP is the one I want to trap So your saying Job Control is the
> key? I can't seem to se how to disable it


Are you having the problem in a script or are you just typing the "trap"
command in an interactive shell? Scripts don't usually have job control
enabled in the first place.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
 
Page generated in 0,06691 seconds with 9 queries