Bug 101145

Summary: msgsnd(3) manpage doesn't define msgsz clearly
Product: Documentation Reporter: Brian Candler <B.Candler>
Component: Books & ArticlesAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Brian Candler 2006-08-01 09:20:06 UTC
msgsnd(3) page doesn't make it clear whether the 'msgsz' argument refers to
the length of the entire *msgp structure (mtype + mtext) or just to the
length of the data in mtext.

Fix: 

The Linux manpage is clearer: it says

       The  mtext field is an array (or other structure) whose size is speci-
       fied by msgsz, a non-negative integer value.  Messages of zero  length
       (i.e.,  no  mtext  field)  are permitted.

But perhaps a simple fix for us is:

     mtype is an integer greater than 0 that can be used for selecting mes-
     sages (see msgrcv(3)); mtext is an array of msgsz bytes, which may be
     between 0 and the system limit (MSGMAX).
How-To-Repeat: 
man 3 msgsnd
Comment 1 ru freebsd_committer freebsd_triage 2006-10-12 12:43:02 UTC
State Changed
From-To: open->patched

Fixed in HEAD, thanks; will merge into RELENG_6 soon. 


Comment 2 ru freebsd_committer freebsd_triage 2006-10-12 12:43:02 UTC
Responsible Changed
From-To: freebsd-doc->ru
Comment 3 dfilter service freebsd_committer freebsd_triage 2006-10-12 12:43:47 UTC
ru          2006-10-12 11:42:41 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/gen         msgsnd.3 
  Log:
  Document what "msgsz" argument really denotes.  [1]
  
  Don't say that "msgsz" can be less than 0, it cannot
  as it's unsigned (POSIX has the same bug).
  
  PR:             docs/101145 [1]
  MFC after:      3 days
  
  Revision  Changes    Path
  1.21      +9 -4      src/lib/libc/gen/msgsnd.3
_______________________________________________
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 ru freebsd_committer freebsd_triage 2006-10-16 12:55:52 UTC
State Changed
From-To: patched->closed

Merged into RELENG_6.
Comment 5 dfilter service freebsd_committer freebsd_triage 2006-10-16 12:55:58 UTC
ru          2006-10-16 11:55:50 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    lib/libc/gen         msgsnd.3 
  Log:
  MFC: 1.21: Document what "msgsz" actually means.
  
  PR:             docs/101145
  Approved by:    re (hrs)
  
  Revision  Changes    Path
  1.20.2.1  +9 -4      src/lib/libc/gen/msgsnd.3
_______________________________________________
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"