diff options
author | Ben Cohen <ben-cohen@users.noreply.github.com> | 2017-09-08 17:37:04 +0100 |
---|---|---|
committer | metalefty <meta@vmeta.jp> | 2017-10-17 14:34:25 +0900 |
commit | 6fb3fcfc66ccff5e436285fca04041d82c310ea4 (patch) | |
tree | 17673a365ba33124cbf5326e89b772d18d541c25 /xrdpapi | |
parent | 1d5aa8cc977f278f30bbc01105bf7ff66cd49596 (diff) | |
download | xrdp-proprietary-6fb3fcfc66ccff5e436285fca04041d82c310ea4.tar.gz xrdp-proprietary-6fb3fcfc66ccff5e436285fca04041d82c310ea4.zip |
Handle EINTR for send() in handle_connection()
Diffstat (limited to 'xrdpapi')
-rw-r--r-- | xrdpapi/xrdp-ssh-agent.c | 3 |
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); |