changeset 15597:2ae4a40b3b24

dsync: Make remote's stderr fd nonblocking to avoid hanging.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Jan 2013 16:24:20 +0200
parents f0c11f532e3b
children f06419a40a06
files src/doveadm/dsync/doveadm-dsync.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/dsync/doveadm-dsync.c	Tue Jan 08 10:57:34 2013 +0200
+++ b/src/doveadm/dsync/doveadm-dsync.c	Tue Jan 08 16:24:20 2013 +0200
@@ -103,6 +103,8 @@
 	ctx->fd_in = fd_out[0];
 	ctx->fd_out = fd_in[1];
 	ctx->fd_err = fd_err[0];
+
+	fd_set_nonblock(ctx->fd_err, TRUE);
 	ctx->err_stream = i_stream_create_fd(ctx->fd_err, IO_BLOCK_SIZE, FALSE);
 	i_stream_set_return_partial_line(ctx->err_stream, TRUE);
 }