The functions raw()
and noraw()
turns on and off the raw mode terminal. That is, when the terminal is in raw mode (we can translate to "raw mode", or "no processing mode"), typed characters are passed to the program running on the terminal immediately and directly. Consequently, the interrupt, close, suspension and flow control characters are all passed, not interpreted by the terminal and generate some signal.
For example, if we open a program that calls the function raw()
and puts the terminal in raw mode and press CTRL+C (meaning the control character ^C
, that generates a signal SIGINT
pro program running on the terminal), we would have no response from the terminal. Instead of generating the interrupt signal, the terminal would pass the control character ^C
direct to the program, which in turn will be able to read it. Without the raw mode, the terminal would interpret the character ^C
and generate an interruption signal for the program, which would practically end the program.
https://linux.die.net/man/3/raw
– Mário Feroldi
I had already seen this site, and I didn’t understand anything. Someone can explain me in a simpler way ?
– silash35