1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
|
'\" t
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH MQ_OPEN 3 2006-02-25 "Linux" "Linux Programmer's Manual"
.SH ̾
mq_open \- å塼ץ
.SH
.nf
.B #include <mqueue.h>
.sp
.BI "mqd_t mq_open(const char *" name ", int " oflag );
.BI "mqd_t mq_open(const char *" name ", int " oflag ", mode_t " mode ,
.BI " struct mq_attr *" attr );
.fi
.sp
\fI\-lrt\fP ǥ롣
.SH
.BR mq_open ()
ϡ POSIX å塼뤫¸Υ塼
ץ롣塼
.I name
Ǽ̤롣
.I name
ιξܺ٤ˤĤƤ
.B mq_overview (7)
ȡ
.I oflag
ˤϡؿƤӽФ椹ե饰ꤹ롣
.I oflag
ˤϡʲΤ줫ĤɬꤷʤФʤʤ
.TP
.B O_RDONLY
åμѤȤƥ塼ץ롣
.TP
.B O_WRONLY
åѤȤƥ塼ץ롣
.TP
.B O_RDWR
åξѤȤƥ塼ץ롣
.PP
0 İʾβΥե饰ӥåñ̤ OR ()
.I oflag
ɲäǻǤ롣
.TP
.B O_NONBLOCK
(non-blocking) ⡼ɤǥ塼ץ롣
.BR mq_receive (3)
.BR mq_send (3)
ϡ̾ (block) ˤơ顼
.B EAGAIN
ǼԤ褦ˤʤ롣
.TP
.B O_CREAT
¸ߤʤ硢å塼롣
å塼νͭ (桼 ID) ȥ롼ͭ (롼 ID) ϡ
줾ƤӽФץμ¸桼 ID ȼ¸롼 ID ꤵ롣
.\" ºݤϡLinux Ǥϥե륷ƥ ID Ѥ롣
.TP
.B O_EXCL
.B O_CREAT
.I oflag
˻ꤵ졢Ļꤵ줿̾
.I name
ĥ塼Ǥ¸ߤ硢顼
.B EEXIST
ǼԤ롣
.PP
.I oflag
.B O_CREAT
ꤹ硢ɲä 2ĤΰͿɬפ롣
.I mode
ϡ塼ŬѤ (permission)
.BR open (2)
Ʊ褦˻ꤹ롣
ϥץ umask ǥޥ롣
.I attr
ϡ塼°ꤹ롣ܺ٤ϡ
.BR mq_getattr (3)
ȡ
.I attr
NULL ξ硢塼ϼ줿ǥե°Ǻ롣
.SH ֤
ȡ
.BR mq_open ()
ϥå塼һ (message queue descriptor) ֤
å塼һҤ¾Υå塼ϢδؿǻѤ롣
顼ξ硢
.BR mq_open ()
.I "(mqd_t)\ \-1"
֤
.I errno
˥顼ͤꤹ롣
.SH 顼
.TP
.B EACCES
塼¸ߤ뤬ƤӽФꤵ줿⡼ɤǤΥ塼
ץĤʤ
.TP
.B EEXIST
.I oflag
.B O_CREAT
.B O_EXCL
ξꤵ줿ꤵ줿̾
.I name
ĥ塼Ǥ¸ߤ롣
.TP
.B EINVAL
.I oflag
.B O_CREAT
ꤵ졢
.I attr
NULL ʳ
.I attr\->mq_maxmsg
.I attr\->mq_msqsize
Ǥä
ΥեɤξȤ 0 礭ʤФʤʤ
ץøʤ
.RB ( CAP_SYS_RESOURCE
ѥӥƥʤ) 硢
.I attr\->mq_maxmsg
.I attr\->mq_msgsize
ϡ줾
.IR msg_max
.I msgsize_max
ʲǤʤФʤʤ
ޤøץξǤ⡢
.I attr\->mq_maxmsg
.B HARD_MAX
¤Ķ뤳ȤϤǤʤ
(ξ¤˴ؤܺ٤
.BR mq_overview (7)
ȡ)
.TP
.B EMFILE
ΥץץƤեȥå塼ο
ץξ¤ãƤ롣
.TP
.B ENAMETOOLONG
.I name
Ĺ롣
.TP
.B ENFILE
ƥΤǥץƤեȥå塼ι
ƥ¤ãƤ롣
.TP
.B ENOENT
.B O_CREAT
ե饰
.I oflag
˻ꤵʤäꤵ줿̾
.I name
ĥ塼¸ߤʤ
.TP
.B ENOMEM
ʬʥ꤬ʤ
.TP
.B ENOSPC
å塼Τ˽ʬʶ֤ʤ
Υ顼Ϥ餯
.I queues_max
¤ᵯäΤ
.BR mq_overview (7)
ȡ
.SH
POSIX.1-2001.
.SH Х
2.6.14 Υͥˤϡ
ץ umask
.I mode
ǻꤵ줿ŬѤʤä
.SH Ϣ
.BR mq_close (3),
.BR mq_getattr (3),
.BR mq_notify (3),
.BR mq_receive (3),
.BR mq_send (3),
.BR mq_unlink (3),
.BR mq_overview (7)
|