Deleted Added
full compact
msgsnd.2 (108030) msgsnd.2 (108087)
1.\" $NetBSD: msgsnd.2,v 1.1 1995/10/16 23:49:24 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:

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

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.\"
1.\" $NetBSD: msgsnd.2,v 1.1 1995/10/16 23:49:24 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:

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

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.\"
32.\" $FreeBSD: head/lib/libc/gen/msgsnd.3 108030 2002-12-18 10:13:54Z ru $
32.\" $FreeBSD: head/lib/libc/gen/msgsnd.3 108087 2002-12-19 09:40:28Z ru $
33.\"
34.Dd November 24, 1997
35.Dt MSGSND 3
36.Os
37.Sh NAME
38.Nm msgsnd
39.Nd send a message to a message queue
40.Sh LIBRARY

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

45.In sys/msg.h
46.Ft int
47.Fn msgsnd "int msqid" "void *msgp" "size_t msgsz" "int msgflg"
48.Sh DESCRIPTION
49The
50.Fn msgsnd
51function sends a message to the message queue specified in
52.Fa msqid .
33.\"
34.Dd November 24, 1997
35.Dt MSGSND 3
36.Os
37.Sh NAME
38.Nm msgsnd
39.Nd send a message to a message queue
40.Sh LIBRARY

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

45.In sys/msg.h
46.Ft int
47.Fn msgsnd "int msqid" "void *msgp" "size_t msgsz" "int msgflg"
48.Sh DESCRIPTION
49The
50.Fn msgsnd
51function sends a message to the message queue specified in
52.Fa msqid .
53The
53.Fa msgp
54.Fa msgp
55argument
54points to a structure containing the message.
55This structure should
56consist of the following members:
57.Bd -literal
58 long mtype; /* message type */
59 char mtext[1]; /* body of message */
60.Ed
61.Pp

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

124.Rv -std msgsnd
125.Sh ERRORS
126The
127.Fn msgsnd
128function
129will fail if:
130.Bl -tag -width Er
131.It Bq Er EINVAL
56points to a structure containing the message.
57This structure should
58consist of the following members:
59.Bd -literal
60 long mtype; /* message type */
61 char mtext[1]; /* body of message */
62.Ed
63.Pp

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

126.Rv -std msgsnd
127.Sh ERRORS
128The
129.Fn msgsnd
130function
131will fail if:
132.Bl -tag -width Er
133.It Bq Er EINVAL
134The
132.Fa msqid
135.Fa msqid
136argument
133is not a valid message queue identifier
134.Pp
135The message queue was removed while
136.Fn msgsnd
137was waiting for a resource to become available in order to deliver the
138message.
139.Pp
137is not a valid message queue identifier
138.Pp
139The message queue was removed while
140.Fn msgsnd
141was waiting for a resource to become available in order to deliver the
142message.
143.Pp
144The
140.Fa msgsz
145.Fa msgsz
146argument
141is less than 0, or greater than
142.Va msg_qbytes .
143.Pp
147is less than 0, or greater than
148.Va msg_qbytes .
149.Pp
150The
144.Fa mtype
151.Fa mtype
152argument
145is not greater than 0.
146.It Bq Er EACCES
147The calling process does not have write access to the message queue.
148.It Bq Er EAGAIN
149There was no space for this message either on the queue, or in the whole
150system, and
151.Dv IPC_NOWAIT
152was set in
153.Fa msgflg .
154.It Bq Er EFAULT
153is not greater than 0.
154.It Bq Er EACCES
155The calling process does not have write access to the message queue.
156.It Bq Er EAGAIN
157There was no space for this message either on the queue, or in the whole
158system, and
159.Dv IPC_NOWAIT
160was set in
161.Fa msgflg .
162.It Bq Er EFAULT
163The
155.Fa msgp
164.Fa msgp
165argument
156points to an invalid address.
157.It Bq Er EINTR
158The system call was interrupted by the delivery of a signal.
159.El
160.Sh BUGS
161.Nx
162and
163.Fx
164do not define the
165.Er EIDRM
166error value, which should be used
167in the case of a removed message queue.
168.Sh HISTORY
169Message queues appeared in the first release of AT&T Unix System V.
166points to an invalid address.
167.It Bq Er EINTR
168The system call was interrupted by the delivery of a signal.
169.El
170.Sh BUGS
171.Nx
172and
173.Fx
174do not define the
175.Er EIDRM
176error value, which should be used
177in the case of a removed message queue.
178.Sh HISTORY
179Message queues appeared in the first release of AT&T Unix System V.