Lots of apps wait for stdin to be closed as an indication it's time to do something meaningful (like exit). Without the ability to close stdin, one needs to create an intermediary wrapper that knows uses some inbound signal to close stdin (e.g. two \n, EOF, etc.)
The test example conveniently reads one line and exits.
Lots of apps wait for stdin to be closed as an indication it's time to do something meaningful (like exit). Without the ability to close stdin, one needs to create an intermediary wrapper that knows uses some inbound signal to close stdin (e.g. two \n, EOF, etc.)
The test example conveniently reads one line and exits.
A trivial example is to use write to cat's stdin.