Skip to content

Commit

Permalink
Avoid SIGPIPE in mechglue when gssproxy closed the connection
Browse files Browse the repository at this point in the history
SIGPIPE should not be passed up to the calling program

Signed-off-by: Volker Lendecke <vl@samba.org>
  • Loading branch information
vlendec authored and simo5 committed Apr 22, 2024
1 parent da2f170 commit 749847f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/gpm_common.c
Expand Up @@ -396,7 +396,7 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx,
}

ret = 0;
wn = write(gpmctx->fd, &size, sizeof(uint32_t));
wn = send(gpmctx->fd, &size, sizeof(uint32_t), MSG_NOSIGNAL);
if (wn == -1) {
ret = errno;
}
Expand Down Expand Up @@ -424,7 +424,7 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx,
goto done;
}

wn = write(gpmctx->fd, buffer + pos, length - pos);
wn = send(gpmctx->fd, buffer + pos, length - pos, MSG_NOSIGNAL);
if (wn == -1) {
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
continue;
Expand Down

0 comments on commit 749847f

Please sign in to comment.