I use the following signals/interrupts in my Bash script:
Ctrl-C = SIGINT
Ctrl-\ = SIGQUIT
Ctrl-Z = SIGTSTP
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.
These 'keystrokes' are not necessarily standard.
stty determines what your signal if any your process receives from keystroke combinations.
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 07:42 AM.|