><>, 7 bytes
i2%:n:, This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).
Just for reference, exiting cleanly without errors is an extra byte:
i2%:n?!;