From mbsd@pacbell.net  Sun Mar  6 02:50:55 2005
Return-Path: <mbsd@pacbell.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6CE4C16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Mar 2005 02:50:55 +0000 (GMT)
Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 10B2F43D3F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  6 Mar 2005 02:50:55 +0000 (GMT)
	(envelope-from mbsd@pacbell.net)
Received: from antec.home (adsl-64-168-24-254.dsl.snfc21.pacbell.net [64.168.24.254])
	by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j262kkEN029846
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 5 Mar 2005 21:46:47 -0500
Message-Id: <20050305185017.C693@antec.home>
Date: Sat, 5 Mar 2005 18:50:54 -0800 (PST)
From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mbsd@pacbell.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: SO_NOSIGPIPE socket option undocumented

>Number:         78479
>Category:       docs
>Synopsis:       [patch] getsockopt(2): SO_NOSIGPIPE socket option undocumented
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 06 03:00:33 GMT 2005
>Closed-Date:    Sat Apr 15 13:38:03 GMT 2006
>Last-Modified:  Sat Apr 15 13:38:03 GMT 2006
>Originator:     Mikko Tyolajarvi
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sotec.home 6.0-CURRENT FreeBSD 6.0-CURRENT #28: Sat Mar 5 16:58:15 PST 2005 mikko@sotec.home:/usr/obj/usr/src/sys/SOTEC i386

>Description:

The SO_NOSIGPIPE socket option that can be used to disable SIGPIPE
generation on a per-socket basis is not mentioned in getsockopt(2).

>How-To-Repeat:

man getsockopt

>Fix:

Somehting like this:

Index: getsockopt.2
===================================================================
RCS file: /home/ncvs/src/lib/libc/sys/getsockopt.2,v
retrieving revision 1.32
diff -b -u -r1.32 getsockopt.2
--- getsockopt.2	20 Jan 2005 09:17:05 -0000	1.32
+++ getsockopt.2	6 Mar 2005 02:05:26 -0000
@@ -163,6 +163,7 @@
  .It Dv SO_SNDTIMEO Ta "set timeout value for output"
  .It Dv SO_RCVTIMEO Ta "set timeout value for input"
  .It Dv SO_ACCEPTFILTER Ta "set accept filter on listening socket"
+.It Dv SO_NOSIGPIPE Ta "disable generation of SIGPIPE for the socket"
  .It Dv SO_TYPE Ta "get the type of the socket (get only)"
  .It Dv SO_ERROR Ta "get and clear error on the socket (get only)"
  .El
@@ -355,6 +356,13 @@
  Passing in an
  .Fa optval
  of NULL will remove the filter.
+.Pp
+The
+.Dv SO_NOSIGPIPE
+option disables the SIGPIPE signal normally sent when writing to a
+connected socket where the other end has been closed returns with
+the error
+.Er EPIPE .
  .Pp
  Finally,
  .Dv SO_TYPE



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Apr 15 13:37:39 UTC 2006 
State-Changed-Why:  
Committed to HEAD.  Thanks for the patch! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78479 
>Unformatted:
