This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlfunc/msgsnd: the supplied MSG doesn't have a length field
authorTony Cook <tony@develop-help.com>
Wed, 18 Nov 2020 00:42:24 +0000 (11:42 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 24 Nov 2020 02:35:21 +0000 (13:35 +1100)
The length of the message is derived from the length of the MSG
less the size of the type field.

pod/perlfunc.pod

index e864147..9f0c820 100644 (file)
@@ -4326,9 +4326,8 @@ X<msgsnd>
 
 Calls the System V IPC function msgsnd to send the message MSG to the
 message queue ID.  MSG must begin with the native long integer message
-type, be followed by the length of the actual message, and then finally
-the message itself.  This kind of packing can be achieved with
-C<pack("l! a*", $type, $message)>.  Returns true if successful,
+type, followed by the message itself.  This kind of packing can be achieved
+with C<pack("l! a*", $type, $message)>.  Returns true if successful,
 false on error.  See also L<perlipc/"SysV IPC"> and the documentation
 for L<C<IPC::SysV>|IPC::SysV> and L<C<IPC::Msg>|IPC::Msg>.