From nobody@FreeBSD.org  Wed Feb 28 09:07:45 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9AA2F16A402
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Feb 2007 09:07:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A47E13C4AA
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Feb 2007 09:07:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1S97jTm033995
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Feb 2007 09:07:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1S97jO8033993;
	Wed, 28 Feb 2007 09:07:45 GMT
	(envelope-from nobody)
Message-Id: <200702280907.l1S97jO8033993@www.freebsd.org>
Date: Wed, 28 Feb 2007 09:07:45 GMT
From: Jari Kirma<kirma@cs.hut.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] MSG_PEEK listed on send(2) but not applicable
X-Send-Pr-Version: www-3.0

>Number:         109667
>Category:       docs
>Synopsis:       [patch] MSG_PEEK listed on send(2) but not applicable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 28 09:10:06 GMT 2007
>Closed-Date:    Fri May 04 09:08:21 GMT 2007
>Last-Modified:  Fri May 04 09:08:21 GMT 2007
>Originator:     Jari Kirma
>Release:        FreeBSD 7.0
>Organization:
Helsinki University of Technology
>Environment:
Any >= FreeBSD 2.0.5alpha
>Description:
MSG_PEEK is listed on send(2) manual page. It's applicable to recv(2), but not send(2).
>How-To-Repeat:

>Fix:
Apply the patch (against rev 1.32.2.1)

Patch attached with submission follows:

*** src/lib/libc/sys/send.2	Fri Feb 9 21:22:32 2007
--- src/lib/libc/sys/send.2.new	Wed Feb 28 8:51:22 2007
***************
*** 104,110 ****
  argument may include one or more of the following:
  .Bd -literal
  #define	MSG_OOB		0x00001 /* process out-of-band data */
- #define	MSG_PEEK	0x00002 /* peek at incoming message */
  #define	MSG_DONTROUTE	0x00004 /* bypass routing, use direct interface */
  #define MSG_EOR		0x00008 /* data completes record */
  #define	MSG_EOF		0x00100 /* data completes transaction */
--- 104,109 ----

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->wollman 
Responsible-Changed-By: roam 
Responsible-Changed-When: Thu Apr 26 14:33:17 UTC 2007 
Responsible-Changed-Why:  

The MSG_PEEK flag was added to the send(2) manual page by Garrett 
Wollman in rev. 1.2, so I think he ought to be the one to decide whether 
the flag should be removed - albeit it might be just a tad difficult 
to recall the original reasoning back from 1995 :) 

Garrett, the way I see it, the MSG_PEEK flag was either: 
- added because it was related to T/TCP, and thus ought to have been 
removed from the send(2) manual page by Joel Dahl's rev. 1.33; 
- added because it was in the list of flags copied over from 
the <sys/socket.h> file, and thus ought to be removed, since it is 
not really relevant to the send(2) syscall :) 
- added for some other reasons that I cannot think of right now, but that 
still make it necessary for that flag to be in the send(2) manual page :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109667 

From: Garrett Wollman <wollman@bimajority.org>
To: Peter Pentchev <roam@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: UNS: Re: docs/109667: [patch] MSG_PEEK listed on send(2) but not applicable
Date: Thu, 26 Apr 2007 18:16:52 -0400

 <<On Thu, 26 Apr 2007 14:40:53 GMT, Peter Pentchev <roam@FreeBSD.org> said:
 
 > The MSG_PEEK flag was added to the send(2) manual page by Garrett
 > Wollman in rev. 1.2, so I think he ought to be the one to decide whether
 > the flag should be removed - albeit it might be just a tad difficult
 > to recall the original reasoning back from 1995 :)
 
 I honestly haven't the foggiest idea.
 
 > Garrett, the way I see it, the MSG_PEEK flag was either:
 > - added because it was related to T/TCP, and thus ought to have been
 >   removed from the send(2) manual page by Joel Dahl's rev. 1.33;
 
 Doubt it.
 
 > - added because it was in the list of flags copied over from
 >   the <sys/socket.h> file, and thus ought to be removed, since it is
 >   not really relevant to the send(2) syscall :)
 
 That seems most likely.
 
 Feel free to remove it; MSG_PEEK is obviously not relevant to send(2).
 
 -GAWollman
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/109667: commit references a PR
Date: Fri, 27 Apr 2007 10:28:37 +0000 (UTC)

 roam        2007-04-27 10:28:30 UTC
 
   FreeBSD src repository (doc,ports committer)
 
   Modified files:
     lib/libc/sys         send.2 
   Log:
   Remove the MSG_PEEK flag from the documentation of the send(2) syscall -
   it is only relevant to receiving data from sockets, not to sending.
   
   PR:             109667
   Submitted by:   Jari Kirma <kirma@cs.hut.fi>
   Approved by:    wollman
   
   Revision  Changes    Path
   1.35      +0 -1      src/lib/libc/sys/send.2
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: roam 
State-Changed-When: Fri Apr 27 10:30:58 UTC 2007 
State-Changed-Why:  
I removed the MSG_PEEK flag from -CURRENT's the send(2) manpage, and 
will MFC it to RELENG_6 and RELENG_5 in a week if nobody objects. 
Thanks for bringing this up! 


Responsible-Changed-From-To: wollman->roam 
Responsible-Changed-By: roam 
Responsible-Changed-When: Fri Apr 27 10:30:58 UTC 2007 
Responsible-Changed-Why:  
My MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109667 
State-Changed-From-To: patched->closed 
State-Changed-By: roam 
State-Changed-When: Fri May 4 09:07:50 UTC 2007 
State-Changed-Why:  
I've just MFC'd the change to the 6.x, 5.x, and 4.x send(2) manual pages. 
Thanks again for bringing this up! 

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