Operating System - HP-UX
1826964 Members
4360 Online
109705 Solutions
New Discussion

how do stty settings and signals correlate

 
SOLVED
Go to solution
Ian Lochray
Respected Contributor

how do stty settings and signals correlate

What is the correlation between stty settings and signals. For example, I have stty eof set to ^D - what signal will this generate? Where can I see the correspondence between the two?
3 REPLIES 3
David Lodge
Trusted Contributor
Solution

Re: how do stty settings and signals correlate

There is no real correlation between the two - stty is for setting up your terminal settings. Signals are a basic form of interprocess communication.

EOF doesn't send a signal - all the shell sees is that it recieves an EOF character and terminates the file (or shell)

Some of the stty setting will send signals *to your currently running command* - such as INTR, QUIT, KILL etc, these send the signal of that name (use kill -l to find out the signal names)

dave
Sridhar Bhaskarla
Honored Contributor

Re: how do stty settings and signals correlate

Hi Ian,

I am not sure if I understand your question. EOF character is interpreted as end-of-file by the terminal. Best examples are kill and erase. If you set up ^U as the kill character, then typing in ^U at the terminal after typing in a word will make the terminal to kill the word.

Check out the man page termio and stty for more details.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
John Palmer
Honored Contributor

Re: how do stty settings and signals correlate

EOF doesn't generate a signal, it just defines the character that is interpreted as 'End Of File'. See man termio for details and also 'kill -l'.

Special characters that do generate a signal are:-

intr signal 2
quit signal 3
susp signal 24

Regards,
John