summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2012-05-28 19:22:23 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2012-05-28 19:22:23 +0000
commit28fd93073aed20ec5b29aea4dc2d957825f878e9 (patch)
tree6ad2d76d23e78dafac29a1688be3ff266847b2ae
parent577554bf923e581b3639be204e305a340813b902 (diff)
Notes
-rw-r--r--lib/libfetch/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index 39a8a6b20af5c..425b6de131455 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -209,11 +209,13 @@ conn_t *
fetch_reopen(int sd)
{
conn_t *conn;
+ int opt = 1;
/* allocate and fill connection structure */
if ((conn = calloc(1, sizeof(*conn))) == NULL)
return (NULL);
fcntl(sd, F_SETFD, FD_CLOEXEC);
+ setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof opt);
conn->sd = sd;
++conn->ref;
return (conn);