Displaying 2 results from an estimated 2 matches for "mux_client_read".
2016 Sep 08
3
[Bug 2612] New: Sporadically need to press <ENTER> for multiplexed connection to finish
...ent_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 5485
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 3
<Have to hit ENTER here>
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0
I checked out the code (commit
775f8a23f2353f5869003c57a213d14b28e0736e) and, after adding some
additional log messages to mux.c, I notice the flow was blocking in
mux_client_read(), in the call to poll():...
2010 Jan 14
1
ssh(1) multiplexing rewrite
...rminate = signo;
+}
+
+/*
+ * Relay signal handler - used to pass some signals from mux client to
+ * mux master.
+ */
+static void
+control_client_sigrelay(int signo)
+{
+ int save_errno = errno;
+
+ if (muxserver_pid > 1)
+ kill(muxserver_pid, signo);
+
+ errno = save_errno;
+}
+
+static int
+mux_client_read(int fd, Buffer *b, u_int need)
+{
+ u_int have;
+ ssize_t len;
+ u_char *p;
+ struct pollfd pfd;
+
+ pfd.fd = fd;
+ pfd.events = POLLIN;
+ p = buffer_append_space(b, need);
+ for (have = 0; have < need; ) {
+ if (muxclient_terminate) {
+ errno = EINTR;
+ return -1;
+ }
+ len = read(fd, p...