Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: Help: signal(SIGUSR1,myhandle);
       [not found] <1992Oct1.192031.10915@tamsun.tamu.edu>
@ 1992-10-02  3:28 ` Andrew T Duchowski
  0 siblings, 0 replies; only message in thread
From: Andrew T Duchowski @ 1992-10-02  3:28 UTC (permalink / raw)


Previously I wrote:

>[..]
>I also see how I can use ^\ (SIGQUIT) and ^Z (SIGTSTP) signals
>[along with ^C (SIGINT)].  But I want to use the ^[ (ESC key)
>signal coming from the keyboard.  How can I do this?  I know
>that there are SIGUSR1 and SIGUSR2 signals, but how do you
>define these signals to correspond to the ESC key?
>

Essentially, I need an *interrupt* routine that gets invoked on
the ESC key.  It seems to me that signal() is the way to go, 
but I don't know how I can define signals SIGUSR1 and SIGUSR2.

I've had a response suggesting fcntl(), but that seems like
a routine to capture (redirect) the entire keyboard, something
that I don't want to do - I just want the program to be sensitive
to 1 key (signal generated by ESC).

And, btw, this is not a homework assignment.... I'm a graduate
student working as a research assistant, and I don't wish to 
re-invent the wheel -- it seems like this ought to be easily
accomplished, just that the signal man page is a little vague
on how to define SIGUSR1 and SIGUSR2.  Right now I'm using
signal(SIGINT,handler), but this makes it very difficult to 
debug the code since SIGINT breaks the debugger.

Thanks in advance for suggestions (and thanks for the fcntl suggestion).
Please email and post optionally.
-Andrew
-- 
                                         _/                              _/
Andrew Duchowski      _/_/  _/_/_/   _/_/_/ _/_/_/ _/_/_/  _/    _/  _/_/_/
Texas A&M University   _/_/  _/  _/ _/   _/  _/   _/_/_/_/ _/ _/ _/ _/   _/
andrewd@cs.tamu.edu  _/  _/  _/  _/ _/   _/  _/   _/       _/ _/ _/ _/   _/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-10-02  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1992Oct1.192031.10915@tamsun.tamu.edu>
1992-10-02  3:28 ` Help: signal(SIGUSR1,myhandle); Andrew T Duchowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox