On Linux, when a shell is running a process it usually allows you to keep typing commands which will be processed when the process finishes. The same can be observed in other applications that behave *like* a "shell". For example, say we do this in
ipython
:
import time
time.sleep(4)
While "sleeping", we can still use the keyboard and anything put on the buffer will be delivered to the input of ipython
upon returning from the sleep
function.
However, while **some** processes are working, the keyboard is completely blocked. It is not only that the characters are not echoed on the terminal but they are not even available on the prompt when the process returns.
What is this difference due to? Is this something to do with the process itself? How can I replicate this characteristic? That is, what do I need to have in place in my programs so that when they run, the keyboard buffer is completely ignored?
Asked by A_A
(173 rep)
Jul 15, 2024, 09:11 AM
Last activity: Jul 15, 2024, 10:08 AM
Last activity: Jul 15, 2024, 10:08 AM