readPipe opens for both stdout/stderr -- only take the correct exitCode in unix