Solved two related Problems:

1: inputs fail to detect EOF, and enter in loop.
2: Deadlock on cyclical pipes.