A command started from an interactive shell may set the terminal to raw mode for its own use. It usually resets it to cooked mode before terminating, but one should not rely on that because the process may crash or be killed. All shells seem to (re)set the terminal to cooked mode to handle that... except dash! Example: execute sh -c 'echo $$; stty raw; sleep 30; stty -raw' from various shells, and kill sh (the output pid). Only with dash, the terminal remains in raw mode.