Bug 109667

Summary: [patch] MSG_PEEK listed on send(2) but not applicable
Product: Documentation Reporter: Jari Kirma <kirma>
Component: Books & ArticlesAssignee: Peter Pentchev <roam>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Jari Kirma 2007-02-28 09:10:06 UTC
MSG_PEEK is listed on send(2) manual page. It's applicable to recv(2), but not send(2).

Fix: Apply the patch (against rev 1.32.2.1)

Patch attached with submission follows:
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2007-04-26 15:33:17 UTC
Responsible Changed
From-To: freebsd-doc->wollman


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 :)
Comment 2 Garrett Wollman 2007-04-26 23:16:52 UTC
<<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
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-04-27 11:28:37 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"
Comment 4 Peter Pentchev freebsd_committer freebsd_triage 2007-04-27 11:30:58 UTC
State Changed
From-To: open->patched

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! 


Comment 5 Peter Pentchev freebsd_committer freebsd_triage 2007-04-27 11:30:58 UTC
Responsible Changed
From-To: wollman->roam

My MFC reminder.
Comment 6 Peter Pentchev freebsd_committer freebsd_triage 2007-05-04 10:07:50 UTC
State Changed
From-To: patched->closed

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!