fifo: test stdin and tidy