Yes, SetEndOfFile only works on "real" files (that is those on a disk/memory card/tape and such). To indicate end of file on a pipe, you have two choices:
1. Close the pipe.
2. Introduce a...