if (!stream->istream.blocking)
break;
}
+ if (ret == -1 && !i_stream_have_bytes_left(&stream->istream) &&
+ stream->istream.v_offset == 0) {
+ /* EOF without any input -> assume the script is repoting
+ failure. pretty ugly way, but currently there's no error
+ reporting channel. */
+ stream->istream.stream_errno = EIO;
+ }
return ret;
}
}
i_assert(ret == -1);
+ if (!i_stream_have_bytes_left(mstream->ext_in) &&
+ mstream->ext_in->v_offset == 0) {
+ /* EOF without any input -> assume the script is repoting
+ failure. pretty ugly way, but currently there's no error
+ reporting channel. */
+ stream->ostream.stream_errno = EIO;
+ return -1;
+ }
if (mstream->ext_in->stream_errno != 0) {
stream->ostream.stream_errno = mstream->ext_in->stream_errno;
return -1;