2 ms·
The shell would know when the program has been finished for the same reason it knows when to print the shell prompt. The issue isn't that the shell is unaware o
by hnlmorg 6y ago
The shell would know when the program has been finished for the same reason it knows when to print the shell prompt. The issue isn't that the shell is unaware of the state of the process, it's that the shell simply doesn't know where the cursor is nor what output a process has written to a TTY. And in fact a TTY can even be written to by processes outside of the same shell process group (since they're all just files in /dev).