Skip to content

Commit

Permalink
Set SO_NOSIGPIPE on sockets opened by iErl.
Browse files Browse the repository at this point in the history
Change-Id: I9dc7a53e7743d13217e1dc6b77039f4a245f6b35
Reviewed-on: http://review.couchbase.org/8808
Reviewed-by: Chris Anderson <jchris@couchbase.com>
Reviewed-by: Jens Alfke <jens@couchbase.com>
Tested-by: Jens Alfke <jens@couchbase.com>
  • Loading branch information
apage43 authored and snej committed Aug 10, 2011
1 parent 4e9fa59 commit 5122e97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/emulator/drivers/common/inet_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3682,6 +3682,8 @@ static int inet_ctl_open(inet_descriptor* desc, int domain, int type,
if ((desc->event = sock_create_event(desc)) == INVALID_EVENT)
return ctl_error(sock_errno(), rbuf, rsize);
SET_NONBLOCKING(desc->s);
int set = 1;
setsockopt(desc->s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof(set));
#ifdef __WIN32__
driver_select(desc->port, desc->event, ERL_DRV_READ, 1);
#endif
Expand Down

0 comments on commit 5122e97

Please sign in to comment.