s3: Make the write end of the echo responder pipe non-blocking
authorVolker Lendecke <vl@samba.org>
Wed, 6 Oct 2010 13:05:59 +0000 (15:05 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 6 Oct 2010 16:00:22 +0000 (18:00 +0200)
Without this, we can get a writable pipe end, but the writev call on the pipe
will block.

source3/smbd/process.c

index 7fea3394223d7a24d800def47b07d01f332ebcd4..36f31dfed692210abfdcf9ac472963ab061ca817 100644 (file)
@@ -2493,6 +2493,7 @@ static bool fork_echo_handler(struct smbd_server_connection *sconn)
                NTSTATUS status;
 
                close(listener_pipe[0]);
+               set_blocking(listener_pipe[1], false);
 
                status = reinit_after_fork(smbd_messaging_context(),
                                           smbd_event_context(), false);