Skip to content

Commit 749847f

Browse files
vlendecsimo5
authored andcommitted
Avoid SIGPIPE in mechglue when gssproxy closed the connection
SIGPIPE should not be passed up to the calling program Signed-off-by: Volker Lendecke <vl@samba.org>
1 parent da2f170 commit 749847f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/gpm_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx,
396396
}
397397

398398
ret = 0;
399-
wn = write(gpmctx->fd, &size, sizeof(uint32_t));
399+
wn = send(gpmctx->fd, &size, sizeof(uint32_t), MSG_NOSIGNAL);
400400
if (wn == -1) {
401401
ret = errno;
402402
}
@@ -424,7 +424,7 @@ static int gpm_send_buffer(struct gpm_ctx *gpmctx,
424424
goto done;
425425
}
426426

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

0 commit comments

Comments
 (0)