I have created a command-line application in Linux that reads data from
stdin can be the terminal).
When I type
Ctrl+C on the terminal, the terminal will send the byte
0x03 to the line discipline. Now instead of the line discipline sending the byte
0x03 to my application, it will instead handle
0x03 as a control character and send the
SIGINT signal to my application.
Is there a way to make sure that the byte
0x03 is sent to my application when I press
Ctrl+C (without having to change the line discipline settings like mentioned in this question).