I am building a small shell interpreter which executes various commands, and I accomplish this by forking my process.
However, I want the child process to stop waiting for input in the standard input stream, and it does so by expecting an EOF. How do I push an EOF deliberately into that stream?
More specifically, if I am looping on this condition:
while (fgets(&input, 1024, stdin) != NULL) { // .....
How can I cause it to become false?