-   Programming (
-   -   Signals (

Speek 12-23-2004 01:41 PM

I use the following signals/interrupts in my Bash script:
Ctrl-\ = SIGQUIT

Are there more signals with accompanying key combinations? I need one more to trap. I thought of Ctrl-D but that seems not to be a signal.

jim mcnamara 12-23-2004 03:55 PM

These 'keystrokes' are not necessarily standard.

stty determines what your signal if any your process receives from keystroke combinations.


and look at the output.

Speek 12-24-2004 05:58 AM

Thanks Jim. I tried 'stty' but it didn't show much. But 'stty -a' shows these:

intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;

In combination with 'man 7 signal' I tried to find an additional key combination that sends a signal that can be trapped, but still no luck. How about those "user-defined signals", SIGUSR1 and SIGUSR2, that are mentioned in man 7 signal? How to define these? Can they be send to the running script with a key combination?

All times are GMT -5. The time now is 08:43 AM.