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 committed Apr 22, 2024
1 parent 66e7fb2 commit 4520134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/gpm_common.c
Original file line number Diff line number Diff line change
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 4520134

Please sign in to comment.