uoff_t fd_size;
};
+static int o_stream_temp_dup_cancel(struct temp_ostream *tstream);
+
static void
o_stream_temp_close(struct iostream_private *stream,
bool close_parent ATTR_UNUSED)
unsigned int i;
tstream->flags &= ~IOSTREAM_TEMP_FLAG_TRY_FD_DUP;
+ if (tstream->dupstream != NULL) {
+ if (o_stream_temp_dup_cancel(tstream) < 0)
+ return -1;
+ }
if (tstream->fd != -1)
return o_stream_temp_fd_sendv(tstream, iov, iov_count);
test_expect_no_more_errors();
o_stream_destroy(&output);
+ /* non-working fd-dup: write data after sending istream */
+ i_stream_seek(input, 0);
+ output = iostream_temp_create_sized(".intentional-nonexistent-error/",
+ IOSTREAM_TEMP_FLAG_TRY_FD_DUP, "test", 4);
+ test_assert(o_stream_send_istream(output, input) > 0);
+ test_expect_errors(1);
+ test_assert(o_stream_send(output, "1", 1) == 1);
+ test_expect_no_more_errors();
+ o_stream_destroy(&output);
+
/* non-working fd-dup: send two istreams */
i_stream_seek(input, 0);
input2 = i_stream_create_limit(input, (uoff_t)-1);