qrexec: try to recover from fork-server communication error

Simply forget about that connection, instead of waiting for further
messages. If that connection is no longer available, select would return
EBADF, which would cause qrexec-agent termination.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-29 15:43:21 +02:00
parent b05fa062be
commit 74490b0b94

View File

@ -427,6 +427,8 @@ void handle_terminated_fork_client(fd_set *rdset) {
release_connection(i); release_connection(i);
} else { } else {
fprintf(stderr, "Unexpected read on fork-server connection: %d(%s)\n", ret, strerror(errno)); fprintf(stderr, "Unexpected read on fork-server connection: %d(%s)\n", ret, strerror(errno));
close(connection_info[i].fd);
release_connection(i);
} }
} }
} }