summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Cohen <ben-cohen@users.noreply.github.com>2017-09-08 17:37:04 +0100
committermetalefty <meta@vmeta.jp>2017-10-17 14:34:25 +0900
commit6fb3fcfc66ccff5e436285fca04041d82c310ea4 (patch)
tree17673a365ba33124cbf5326e89b772d18d541c25
parent1d5aa8cc977f278f30bbc01105bf7ff66cd49596 (diff)
downloadxrdp-proprietary-6fb3fcfc66ccff5e436285fca04041d82c310ea4.tar.gz
xrdp-proprietary-6fb3fcfc66ccff5e436285fca04041d82c310ea4.zip
Handle EINTR for send() in handle_connection()
-rw-r--r--xrdpapi/xrdp-ssh-agent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xrdpapi/xrdp-ssh-agent.c b/xrdpapi/xrdp-ssh-agent.c
index b62c4f99..0e80bb6b 100644
--- a/xrdpapi/xrdp-ssh-agent.c
+++ b/xrdpapi/xrdp-ssh-agent.c
@@ -287,6 +287,7 @@ handle_connection(int client_fd)
if (rc == 1)
{
char *pos = buffer;
+ errno = 0;
while (bytes_to_write > 0)
{
int bytes_written = send(client_fd, pos, bytes_to_write, 0);
@@ -300,7 +301,7 @@ handle_connection(int client_fd)
{
fprintf(stderr, "send() returned 0!\n");
}
- else
+ else if (errno != EINTR)
{
/* Error */
fprintf(stderr, "Error %d on recv\n", errno);