Say that the ping command is running, and I type something on the terminal while ping is still running.Now when ping terminates and bash gain back control, bash will print on the terminal what I typed while ping was running. This is a screenshot that shows what I mean:How did bash get this information? I am sure it did not get it from stdin, because when I typed I typed this while ping was running, I did not press Enter (and so stdin is empty).
How does bash retrieves what was written on the terminal (without Enter being pressed)?
bash;terminal;tty;input