Deleted Added
full compact
msgrcv.2 (50476) msgrcv.2 (57686)
1.\" $NetBSD: msgrcv.2,v 1.1 1995/10/16 23:49:20 jtc Exp $
2.\"
3.\" Copyright (c) 1995 Frank van der Linden
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 14 unchanged lines hidden (view full) ---

23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.\" $NetBSD: msgrcv.2,v 1.1 1995/10/16 23:49:20 jtc Exp $
2.\"
3.\" Copyright (c) 1995 Frank van der Linden
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 14 unchanged lines hidden (view full) ---

23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\" $FreeBSD: head/lib/libc/gen/msgrcv.3 50476 1999-08-28 00:22:10Z peter $
31.\" $FreeBSD: head/lib/libc/gen/msgrcv.3 57686 2000-03-02 09:14:21Z sheldonh $
32.\"
33.\"/
34.Dd November 24, 1997
35.Dt MSGRCV 3
36.Os FreeBSD
37.Sh NAME
38.Nm msgrcv
39.Nd receive a message from a message queue

--- 38 unchanged lines hidden (view full) ---

78.Fa msgtyp
79is less than 0. The first message of the lowest message type that is
80less than or equal to the absolute value of
81.Fa msgtyp
82will be received.
83.El
84.Pp
85.Fa msgsz
32.\"
33.\"/
34.Dd November 24, 1997
35.Dt MSGRCV 3
36.Os FreeBSD
37.Sh NAME
38.Nm msgrcv
39.Nd receive a message from a message queue

--- 38 unchanged lines hidden (view full) ---

78.Fa msgtyp
79is less than 0. The first message of the lowest message type that is
80less than or equal to the absolute value of
81.Fa msgtyp
82will be received.
83.El
84.Pp
85.Fa msgsz
86specifies the maximum length of the requested message. If the received
86specifies the maximum length of the requested message.
87If the received
87message has a length greater than
88.Fa msgsz
89it will be silently truncated if the
90.Dv MSG_NOERROR
91flag is set in
92.Fa msgflg ,
93otherwise an error will be returned.
94.Pp
95If no matching message is present on the message queue specified by
96.Fa msqid ,
97the behavior of
98.Fn msgrcv
99depends on whether the
100.Dv IPC_NOWAIT
101flag is set in
102.Fa msgflg
88message has a length greater than
89.Fa msgsz
90it will be silently truncated if the
91.Dv MSG_NOERROR
92flag is set in
93.Fa msgflg ,
94otherwise an error will be returned.
95.Pp
96If no matching message is present on the message queue specified by
97.Fa msqid ,
98the behavior of
99.Fn msgrcv
100depends on whether the
101.Dv IPC_NOWAIT
102flag is set in
103.Fa msgflg
103or not. If
104or not.
105If
104.Dv IPC_NOWAIT
105is set,
106.Fn msgrcv
107will immediately return a value of -1, and set
108.Va errno
109to
110.Er EAGAIN .
111If

--- 98 unchanged lines hidden ---
106.Dv IPC_NOWAIT
107is set,
108.Fn msgrcv
109will immediately return a value of -1, and set
110.Va errno
111to
112.Er EAGAIN .
113If

--- 98 unchanged lines hidden ---