1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-03-22 01:06+0900\n"
10 "PO-Revision-Date: 2012-05-28 18:00+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man3/sem_close.3:26
25 #: build/C/man3/sem_close.3:26 build/C/man3/sem_destroy.3:26
26 #: build/C/man3/sem_getvalue.3:26 build/C/man3/sem_init.3:26
27 #: build/C/man3/sem_open.3:26 build/C/man7/sem_overview.7:26
28 #: build/C/man3/sem_post.3:26 build/C/man3/sem_unlink.3:26
29 #: build/C/man3/sem_wait.3:26
36 #: build/C/man3/sem_close.3:26 build/C/man3/sem_destroy.3:26
37 #: build/C/man3/sem_getvalue.3:26 build/C/man3/sem_init.3:26
38 #: build/C/man3/sem_open.3:26 build/C/man7/sem_overview.7:26
39 #: build/C/man3/sem_post.3:26 build/C/man3/sem_unlink.3:26
40 #: build/C/man3/sem_wait.3:26 build/C/man2/semctl.2:41
41 #: build/C/man2/semget.2:36 build/C/man2/semop.2:35
47 #: build/C/man3/sem_close.3:26 build/C/man3/sem_destroy.3:26
48 #: build/C/man3/sem_getvalue.3:26 build/C/man3/sem_init.3:26
49 #: build/C/man3/sem_open.3:26 build/C/man7/sem_overview.7:26
50 #: build/C/man3/sem_post.3:26 build/C/man3/sem_unlink.3:26
51 #: build/C/man3/sem_wait.3:26 build/C/man2/semctl.2:41
52 #: build/C/man2/semget.2:36 build/C/man2/semop.2:35
54 msgid "Linux Programmer's Manual"
55 msgstr "Linux Programmer's Manual"
58 #: build/C/man3/sem_close.3:27 build/C/man3/sem_destroy.3:27
59 #: build/C/man3/sem_getvalue.3:27 build/C/man3/sem_init.3:27
60 #: build/C/man3/sem_open.3:27 build/C/man7/sem_overview.7:27
61 #: build/C/man3/sem_post.3:27 build/C/man3/sem_unlink.3:27
62 #: build/C/man3/sem_wait.3:27 build/C/man2/semctl.2:42
63 #: build/C/man2/semget.2:37 build/C/man2/semop.2:36
69 #: build/C/man3/sem_close.3:29
70 msgid "sem_close - close a named semaphore"
71 msgstr "sem_close - 名前付きセマフォをクローズする"
74 #: build/C/man3/sem_close.3:29 build/C/man3/sem_destroy.3:29
75 #: build/C/man3/sem_getvalue.3:29 build/C/man3/sem_init.3:29
76 #: build/C/man3/sem_open.3:29 build/C/man3/sem_post.3:29
77 #: build/C/man3/sem_unlink.3:29 build/C/man3/sem_wait.3:29
78 #: build/C/man2/semctl.2:44 build/C/man2/semget.2:39 build/C/man2/semop.2:38
84 #: build/C/man3/sem_close.3:32 build/C/man3/sem_destroy.3:32
85 #: build/C/man3/sem_getvalue.3:32 build/C/man3/sem_init.3:32
86 #: build/C/man3/sem_post.3:32 build/C/man3/sem_unlink.3:32
87 #: build/C/man3/sem_wait.3:32
89 msgid "B<#include E<lt>semaphore.hE<gt>>\n"
90 msgstr "B<#include E<lt>semaphore.hE<gt>>\n"
93 #: build/C/man3/sem_close.3:34
95 msgid "B<int sem_close(sem_t *>I<sem>B<);>\n"
96 msgstr "B<int sem_close(sem_t *>I<sem>B<);>\n"
99 #: build/C/man3/sem_close.3:37 build/C/man3/sem_destroy.3:37
100 #: build/C/man3/sem_getvalue.3:37 build/C/man3/sem_init.3:37
101 #: build/C/man3/sem_open.3:41 build/C/man3/sem_post.3:37
102 #: build/C/man3/sem_unlink.3:37 build/C/man3/sem_wait.3:41
104 #| msgid "Link with I<-lrt> or I<-pthread>."
105 msgid "Link with I<-pthread>."
106 msgstr "I<-lrt> または I<-pthread> でリンクする。"
109 #: build/C/man3/sem_close.3:37 build/C/man3/sem_destroy.3:37
110 #: build/C/man3/sem_getvalue.3:37 build/C/man3/sem_init.3:37
111 #: build/C/man3/sem_open.3:41 build/C/man7/sem_overview.7:29
112 #: build/C/man3/sem_post.3:37 build/C/man3/sem_unlink.3:37
113 #: build/C/man3/sem_wait.3:49 build/C/man2/semctl.2:52
114 #: build/C/man2/semget.2:49 build/C/man2/semop.2:57
120 #: build/C/man3/sem_close.3:43
122 "B<sem_close>() closes the named semaphore referred to by I<sem>, allowing "
123 "any resources that the system has allocated to the calling process for this "
124 "semaphore to be freed."
126 "B<sem_close>() は I<sem> が参照する名前付きセマフォをクローズし、 このセマ"
127 "フォ用に呼び出し元プロセスにシステムが割り当てていた リソースを解放できるよう"
131 #: build/C/man3/sem_close.3:43 build/C/man3/sem_destroy.3:55
132 #: build/C/man3/sem_getvalue.3:54 build/C/man3/sem_init.3:77
133 #: build/C/man3/sem_open.3:104 build/C/man3/sem_post.3:45
134 #: build/C/man3/sem_unlink.3:44 build/C/man3/sem_wait.3:108
135 #: build/C/man2/semctl.2:340 build/C/man2/semget.2:157
136 #: build/C/man2/semop.2:314
142 #: build/C/man3/sem_close.3:49
144 "On success B<sem_close>() returns 0; on error, -1 is returned, with "
145 "I<errno> set to indicate the error."
147 "成功すると、 B<sem_close>() は 0 を返す。エラーの場合、-1 を返し、 I<errno> "
151 #: build/C/man3/sem_close.3:49 build/C/man3/sem_destroy.3:61
152 #: build/C/man3/sem_getvalue.3:60 build/C/man3/sem_init.3:83
153 #: build/C/man3/sem_open.3:116 build/C/man3/sem_post.3:52
154 #: build/C/man3/sem_unlink.3:50 build/C/man3/sem_wait.3:114
155 #: build/C/man2/semctl.2:387 build/C/man2/semget.2:163
156 #: build/C/man2/semop.2:324
162 #: build/C/man3/sem_close.3:50 build/C/man3/sem_destroy.3:62
163 #: build/C/man3/sem_getvalue.3:61 build/C/man3/sem_init.3:84
164 #: build/C/man3/sem_open.3:132 build/C/man3/sem_open.3:137
165 #: build/C/man3/sem_post.3:53 build/C/man3/sem_wait.3:119
166 #: build/C/man3/sem_wait.3:133 build/C/man2/semctl.2:420
167 #: build/C/man2/semget.2:188 build/C/man2/semop.2:372
173 #: build/C/man3/sem_close.3:54 build/C/man3/sem_destroy.3:66
174 #: build/C/man3/sem_getvalue.3:65 build/C/man3/sem_post.3:57
175 #: build/C/man3/sem_wait.3:123
176 msgid "I<sem> is not a valid semaphore."
177 msgstr "I<sem> は有効なセマフォではない。"
180 #: build/C/man3/sem_close.3:54 build/C/man3/sem_destroy.3:66
181 #: build/C/man3/sem_getvalue.3:65 build/C/man3/sem_init.3:95
182 #: build/C/man3/sem_open.3:170 build/C/man7/sem_overview.7:138
183 #: build/C/man3/sem_post.3:61 build/C/man3/sem_unlink.3:62
184 #: build/C/man3/sem_wait.3:143 build/C/man2/semctl.2:462
185 #: build/C/man2/semget.2:219 build/C/man2/semop.2:402
187 msgid "CONFORMING TO"
191 #: build/C/man3/sem_close.3:56 build/C/man3/sem_destroy.3:68
192 #: build/C/man3/sem_getvalue.3:67 build/C/man3/sem_init.3:97
193 #: build/C/man3/sem_open.3:172 build/C/man7/sem_overview.7:140
194 #: build/C/man3/sem_post.3:63 build/C/man3/sem_unlink.3:64
195 #: build/C/man3/sem_wait.3:145
196 msgid "POSIX.1-2001."
197 msgstr "POSIX.1-2001."
200 #: build/C/man3/sem_close.3:56 build/C/man3/sem_destroy.3:68
201 #: build/C/man3/sem_getvalue.3:67 build/C/man3/sem_init.3:97
202 #: build/C/man7/sem_overview.7:140 build/C/man3/sem_post.3:63
203 #: build/C/man3/sem_wait.3:145 build/C/man2/semctl.2:465
204 #: build/C/man2/semget.2:223 build/C/man2/semop.2:405
210 #: build/C/man3/sem_close.3:60
212 "All open named semaphores are automatically closed on process termination, "
213 "or upon B<execve>(2)."
215 "オープンされたすべての名前付きセマフォは、プロセス終了時、もしくは B<execve>"
216 "(2) 実行時に自動的にクローズされる。"
219 #: build/C/man3/sem_close.3:60 build/C/man3/sem_destroy.3:74
220 #: build/C/man3/sem_getvalue.3:71 build/C/man3/sem_init.3:102
221 #: build/C/man3/sem_open.3:172 build/C/man7/sem_overview.7:152
222 #: build/C/man3/sem_post.3:70 build/C/man3/sem_unlink.3:64
223 #: build/C/man3/sem_wait.3:262 build/C/man2/semctl.2:524
224 #: build/C/man2/semget.2:294 build/C/man2/semop.2:531
230 #: build/C/man3/sem_close.3:67
232 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), "
233 "B<sem_wait>(3), B<sem_overview>(7)"
235 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), "
236 "B<sem_wait>(3), B<sem_overview>(7)"
239 #: build/C/man3/sem_close.3:67 build/C/man3/sem_destroy.3:79
240 #: build/C/man3/sem_getvalue.3:75 build/C/man3/sem_init.3:107
241 #: build/C/man3/sem_open.3:179 build/C/man7/sem_overview.7:162
242 #: build/C/man3/sem_post.3:74 build/C/man3/sem_unlink.3:70
243 #: build/C/man3/sem_wait.3:268 build/C/man2/semctl.2:531
244 #: build/C/man2/semget.2:301 build/C/man2/semop.2:540
250 #: build/C/man3/sem_close.3:74 build/C/man3/sem_destroy.3:86
251 #: build/C/man3/sem_getvalue.3:82 build/C/man3/sem_init.3:114
252 #: build/C/man3/sem_open.3:186 build/C/man7/sem_overview.7:169
253 #: build/C/man3/sem_post.3:81 build/C/man3/sem_unlink.3:77
254 #: build/C/man3/sem_wait.3:275 build/C/man2/semctl.2:538
255 #: build/C/man2/semget.2:308 build/C/man2/semop.2:547
258 #| "This page is part of release 3.41 of the Linux I<man-pages> project. A "
259 #| "description of the project, and information about reporting bugs, can be "
260 #| "found at http://www.kernel.org/doc/man-pages/."
262 "This page is part of release 3.50 of the Linux I<man-pages> project. A "
263 "description of the project, and information about reporting bugs, can be "
264 "found at http://www.kernel.org/doc/man-pages/."
266 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
267 "である。プロジェクトの説明とバグ報告に関する情報は\n"
268 "http://www.kernel.org/doc/man-pages/ に書かれている。"
271 #: build/C/man3/sem_destroy.3:26
277 #: build/C/man3/sem_destroy.3:29
278 msgid "sem_destroy - destroy an unnamed semaphore"
279 msgstr "sem_destroy - 名前なしセマフォを破棄する"
282 #: build/C/man3/sem_destroy.3:34
284 msgid "B<int sem_destroy(sem_t *>I<sem>B<);>\n"
285 msgstr "B<int sem_destroy(sem_t *>I<sem>B<);>\n"
288 #: build/C/man3/sem_destroy.3:41
290 "B<sem_destroy>() destroys the unnamed semaphore at the address pointed to "
293 "B<sem_destroy>() は I<sem> が指すアドレスにある名前なしセマフォを破棄する。"
296 #: build/C/man3/sem_destroy.3:46
298 "Only a semaphore that has been initialized by B<sem_init>(3) should be "
299 "destroyed using B<sem_destroy>()."
301 "B<sem_destroy>() を使って破棄するのは、 B<sem_init>(3) で初期化したセマフォ"
305 #: build/C/man3/sem_destroy.3:51
307 "Destroying a semaphore that other processes or threads are currently blocked "
308 "on (in B<sem_wait>(3)) produces undefined behavior."
310 "他のプロセスやスレッドが (B<sem_wait>(3) で) 待ち状態になっているセマフォを"
311 "破棄した場合の挙動は定義されていない。"
314 #: build/C/man3/sem_destroy.3:55
316 "Using a semaphore that has been destroyed produces undefined results, until "
317 "the semaphore has been reinitialized using B<sem_init>(3)."
319 "すでに破棄されたセマフォを、 B<sem_init>(3) を使って再初期化される前に使用し"
323 #: build/C/man3/sem_destroy.3:61
325 "B<sem_destroy>() returns 0 on success; on error, -1 is returned, and "
326 "I<errno> is set to indicate the error."
328 "成功すると、 B<sem_destroy>() は 0 を返す。エラーの場合、-1 を返し、 "
329 "I<errno> にエラーを示す値をセットする。"
331 #. But not on NPTL, where sem_destroy () is a no-op..
333 #: build/C/man3/sem_destroy.3:74
335 "An unnamed semaphore should be destroyed with B<sem_destroy>() before the "
336 "memory in which it is located is deallocated. Failure to do this can result "
337 "in resource leaks on some implementations."
339 "名前なしセマフォは、そのセマフォが置かれているメモリが解放される前に、 "
340 "B<sem_destroy>() を使って破棄しておくべきである。これを行わなかった場合、実"
341 "装によっては リソースのリークが起こりえる。"
344 #: build/C/man3/sem_destroy.3:79
345 msgid "B<sem_init>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
346 msgstr "B<sem_init>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
349 #: build/C/man3/sem_getvalue.3:26
352 msgstr "SEM_GETVALUE"
355 #: build/C/man3/sem_getvalue.3:29
356 msgid "sem_getvalue - get the value of a semaphore"
357 msgstr "sem_getvalue - セマフォの値を取得する"
360 #: build/C/man3/sem_getvalue.3:34
362 msgid "B<int sem_getvalue(sem_t *>I<sem>B<, int *>I<sval>B<);>\n"
363 msgstr "B<int sem_getvalue(sem_t *>I<sem>B<, int *>I<sval>B<);>\n"
366 #: build/C/man3/sem_getvalue.3:43
368 "B<sem_getvalue>() places the current value of the semaphore pointed to "
369 "I<sem> into the integer pointed to by I<sval>."
371 "B<sem_getvalue>() は、 I<sem> が指すセマフォの現在の値を I<sval> で指す整数"
375 #: build/C/man3/sem_getvalue.3:54
377 "If one or more processes or threads are blocked waiting to lock the "
378 "semaphore with B<sem_wait>(3), POSIX.1-2001 permits two possibilities for "
379 "the value returned in I<sval>: either 0 is returned; or a negative number "
380 "whose absolute value is the count of the number of processes and threads "
381 "currently blocked in B<sem_wait>(3). Linux adopts the former behavior."
383 "POSIX.1-2001 によると、 1つ以上のプロセスかスレッドが B<sem_wait>(3) でセマ"
384 "フォのロック待ちで停止している場合、 I<sval> で返される値は 0 もしくは負の値"
385 "のいずれかとなる。 負の値の場合、その絶対値は B<sem_wait>(3) で現在停止して"
386 "いるプロセスかスレッドの合計数に等しい。 Linux は前者の動作 (0 を返す動作) を"
390 #: build/C/man3/sem_getvalue.3:60
392 "B<sem_getvalue>() returns 0 on success; on error, -1 is returned and "
393 "I<errno> is set to indicate the error."
395 "成功すると、 B<sem_getvalue>() は 0 を返す。エラーの場合、-1 を返し、 "
396 "I<errno> にエラーを示す値をセットする。"
399 #: build/C/man3/sem_getvalue.3:71
401 "The value of the semaphore may already have changed by the time "
402 "B<sem_getvalue>() returns."
404 "B<sem_getvalue>() が返るときには、すでにセマフォの値は変化している可能性があ"
408 #: build/C/man3/sem_getvalue.3:75
409 msgid "B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
410 msgstr "B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
413 #: build/C/man3/sem_init.3:26
419 #: build/C/man3/sem_init.3:29
420 msgid "sem_init - initialize an unnamed semaphore"
421 msgstr "sem_init - 名前なしセマフォを初期化する"
424 #: build/C/man3/sem_init.3:34
426 msgid "B<int sem_init(sem_t *>I<sem>B<, int >I<pshared>B<, unsigned int >I<value>B<);>\n"
427 msgstr "B<int sem_init(sem_t *>I<sem>B<, int >I<pshared>B<, unsigned int >I<value>B<);>\n"
430 #: build/C/man3/sem_init.3:44
432 "B<sem_init>() initializes the unnamed semaphore at the address pointed to "
433 "by I<sem>. The I<value> argument specifies the initial value for the "
436 "B<sem_init>() は、 I<sem> が指すアドレスにある名前なしセマフォを初期化す"
437 "る。 I<value> 引き数はそのセマフォの初期値を指定する。"
440 #: build/C/man3/sem_init.3:49
442 "The I<pshared> argument indicates whether this semaphore is to be shared "
443 "between the threads of a process, or between processes."
445 "I<pshared> 引き数は、このセマフォがプロセス内のスレッド間で共有されるのか、 "
449 #: build/C/man3/sem_init.3:57
451 "If I<pshared> has the value 0, then the semaphore is shared between the "
452 "threads of a process, and should be located at some address that is visible "
453 "to all threads (e.g., a global variable, or a variable allocated dynamically "
456 "I<pshared> が 0 の場合、セマフォはプロセス内のスレッド間で共有される。 セマ"
457 "フォはすべてのスレッドから参照可能なアドレスに配置すべきである (例えば、大域"
458 "変数や、ヒープ上に動的に割り当てられた変数など)。"
461 #: build/C/man3/sem_init.3:74
463 "If I<pshared> is nonzero, then the semaphore is shared between processes, "
464 "and should be located in a region of shared memory (see B<shm_open>(3), "
465 "B<mmap>(2), and B<shmget>(2)). (Since a child created by B<fork>(2) "
466 "inherits its parent's memory mappings, it can also access the semaphore.) "
467 "Any process that can access the shared memory region can operate on the "
468 "semaphore using B<sem_post>(3), B<sem_wait>(3), etc."
470 "I<pshared> が 0 以外の場合、セマフォはプロセス間で共有される。セマフォは 共有"
471 "メモリ領域に配置すべきである (B<shm_open>(3), B<mmap>(2), B<shmget>(2) 参"
472 "照)。 (B<fork>(2) で生成された子プロセスは親プロセスのメモリマッピングを継承"
473 "するため、 子プロセスもセマフォにアクセスできる。) 共有メモリ領域にアクセス"
474 "できるプロセスならば、どのプロセスでも B<sem_post>(3) や B<sem_wait>(3) な"
478 #: build/C/man3/sem_init.3:77
480 "Initializing a semaphore that has already been initialized results in "
481 "undefined behavior."
482 msgstr "すでに初期化済のセマフォを初期化した場合の挙動は定義されていない。"
485 #: build/C/man3/sem_init.3:83
487 "B<sem_init>() returns 0 on success; on error, -1 is returned, and I<errno> "
488 "is set to indicate the error."
490 "成功すると、 B<sem_init>() は 0 を返す。エラーの場合、-1 を返し、 I<errno> "
494 #: build/C/man3/sem_init.3:89
495 msgid "I<value> exceeds B<SEM_VALUE_MAX>."
496 msgstr "I<value> が B<SEM_VALUE_MAX> を超えている。"
499 #: build/C/man3/sem_init.3:89
505 #: build/C/man3/sem_init.3:95
507 "I<pshared> is nonzero, but the system does not support process-shared "
508 "semaphores (see B<sem_overview>(7))."
510 "I<pshared> が 0 以外だが、システムがプロセス共有セマフォをサポートしていない "
511 "(B<sem_overview>(7) 参照)。"
514 #: build/C/man3/sem_init.3:102
516 "Bizarrely, POSIX.1-2001 does not specify the value that should be returned "
517 "by a successful call to B<sem_init>(). POSIX.1-2008 rectifies this, "
518 "specifying the zero return on success."
520 "妙なことに、POSIX.1-2001 は B<sem_init>() が成功した場合に返すべき値を規定し"
521 "ていない。 POSIX.1-2008 ではこれが修正され、成功時には 0 を返すことが規定され"
525 #: build/C/man3/sem_init.3:107
526 msgid "B<sem_destroy>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
527 msgstr "B<sem_destroy>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
530 #: build/C/man3/sem_open.3:26
536 #: build/C/man3/sem_open.3:29
537 msgid "sem_open - initialize and open a named semaphore"
538 msgstr "sem_open - 名前付きセマフォを初期化し、オープンする"
541 #: build/C/man3/sem_open.3:34
544 "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n"
545 "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n"
546 "B<#include E<lt>semaphore.hE<gt>>\n"
548 "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n"
549 "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n"
550 "B<#include E<lt>semaphore.hE<gt>>\n"
553 #: build/C/man3/sem_open.3:38
556 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
557 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<, >\n"
558 "B< mode_t >I<mode>B<, unsigned int >I<value>B<);>\n"
560 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
561 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<, >\n"
562 "B< mode_t >I<mode>B<, unsigned int >I<value>B<);>\n"
565 #: build/C/man3/sem_open.3:50
567 "B<sem_open>() creates a new POSIX semaphore or opens an existing "
568 "semaphore. The semaphore is identified by I<name>. For details of the "
569 "construction of I<name>, see B<sem_overview>(7)."
571 "B<sem_open>() は、新規の POSIX セマフォを作成するか、既存のセマフォのオープ"
572 "ンを行う。 セマフォは I<name> で識別される。 I<name> の構成の詳細は "
573 "B<sem_overview>(7) を参照。"
575 #. In reality the file system IDs are used on Linux.
577 #: build/C/man3/sem_open.3:76
579 "The I<oflag> argument specifies flags that control the operation of the "
580 "call. (Definitions of the flags values can be obtained by including "
581 "I<E<lt>fcntl.hE<gt>>.) If B<O_CREAT> is specified in I<oflag>, then the "
582 "semaphore is created if it does not already exist. The owner (user ID) of "
583 "the semaphore is set to the effective user ID of the calling process. The "
584 "group ownership (group ID) is set to the effective group ID of the calling "
585 "process. If both B<O_CREAT> and B<O_EXCL> are specified in I<oflag>, then "
586 "an error is returned if a semaphore with the given I<name> already exists."
588 "I<oflag> 引き数には、 B<sem_open>() の動作を制御するフラグを指定する (oflag "
589 "の値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる)。 I<oflag> "
590 "に B<O_CREAT> が指定されると、まだ存在しない場合にはそのセマフォが作成され"
591 "る。 セマフォの所有者 (ユーザ ID)、グループ所有権 (グループ ID) には、 それぞ"
592 "れ呼び出し元プロセスの実効 UID、実効 GID が設定される。 I<oflag> に "
593 "B<O_CREAT> と B<O_EXCL> の両方が指定された場合、指定された名前 I<name> のセマ"
594 "フォがすでに存在するとエラーが返される。"
597 #: build/C/man3/sem_open.3:104
599 "If B<O_CREAT> is specified in I<oflag>, then two additional arguments must "
600 "be supplied. The I<mode> argument specifies the permissions to be placed on "
601 "the new semaphore, as for B<open>(2). (Symbolic definitions for the "
602 "permissions bits can be obtained by including I<E<lt>sys/stat.hE<gt>>.) The "
603 "permissions settings are masked against the process umask. Both read and "
604 "write permission should be granted to each class of user that will access "
605 "the semaphore. The I<value> argument specifies the initial value for the "
606 "new semaphore. If B<O_CREAT> is specified, and a semaphore with the given "
607 "I<name> already exists, then I<mode> and I<value> are ignored."
609 "I<oflag> に B<O_CREAT> を指定する場合、さらに引き数が 2 つ必要である。 "
610 "I<mode> 引き数は、 B<open>(2) と同じように、新しいセマフォに設定されるアクセ"
611 "ス許可 (permission) を 指定する。許可設定はプロセスの umask でマスクされる "
612 "(許可ビットのシンボル定義は I<E<lt>sys/stat.hE<gt>> のインクルードにより得ら"
613 "れる)。 セマフォにアクセスしようとするユーザは、読み出し許可と書き込み許可の "
614 "両方を得る必要がある。 I<value> 引き数は新しいセマフォの初期値を指定する。 "
615 "B<O_CREAT> が指定され、指定した名前 I<name> のセマフォがすでに存在する場合、 "
616 "I<mode> と I<value> は無視される。"
619 #: build/C/man3/sem_open.3:116
621 "On success, B<sem_open>() returns the address of the new semaphore; this "
622 "address is used when calling other semaphore-related functions. On error, "
623 "B<sem_open>() returns B<SEM_FAILED>, with I<errno> set to indicate the "
626 "成功すると、 B<sem_open>() は新しいセマフォのアドレスを返す。 このアドレスは"
627 "他のセマフォ関連の関数を呼び出す際に使用される。 エラーの場合、 B<sem_open>"
628 "() は B<SEM_FAILED> を返し、 I<errno> にエラーを示す値をセットする。"
631 #: build/C/man3/sem_open.3:117 build/C/man3/sem_unlink.3:51
632 #: build/C/man2/semctl.2:391 build/C/man2/semget.2:167
633 #: build/C/man2/semop.2:336
639 #: build/C/man3/sem_open.3:121
641 "The semaphore exists, but the caller does not have permission to open it."
643 "そのセマフォが存在するが、呼び出し元にはそのセマフォをオープンする 許可がな"
647 #: build/C/man3/sem_open.3:121 build/C/man2/semget.2:175
653 #: build/C/man3/sem_open.3:132
655 "Both B<O_CREAT> and B<O_EXCL> were specified in I<oflag>, but a semaphore "
656 "with this I<name> already exists."
658 "I<oflag> に B<O_CREAT> と B<O_EXCL> の両方が指定されたが、 I<name> という名前"
662 #: build/C/man3/sem_open.3:137
663 msgid "I<value> was greater than B<SEM_VALUE_MAX>."
664 msgstr "I<value> が B<SEM_VALUE_MAX> よりも大きい。"
667 #: build/C/man3/sem_open.3:141
668 msgid "I<name> consists of just \"/\", followed by no other characters."
670 "I<name> が \"/\" だけで構成され、その後ろに他の文字が続いていなかった。"
673 #: build/C/man3/sem_open.3:141
679 #: build/C/man3/sem_open.3:144
680 msgid "The process already has the maximum number of files and open."
681 msgstr "オープンされたファイル数がすでにそのプロセスにおける上限に達している。"
684 #: build/C/man3/sem_open.3:144 build/C/man3/sem_unlink.3:54
686 msgid "B<ENAMETOOLONG>"
687 msgstr "B<ENAMETOOLONG>"
690 #: build/C/man3/sem_open.3:148 build/C/man3/sem_unlink.3:58
691 msgid "I<name> was too long."
692 msgstr "I<name> が長すぎる。"
695 #: build/C/man3/sem_open.3:148
701 #: build/C/man3/sem_open.3:151
702 msgid "The system limit on the total number of open files has been reached."
703 msgstr "オープンされたファイル総数がシステム全体での上限に達している。"
706 #: build/C/man3/sem_open.3:151 build/C/man3/sem_unlink.3:58
707 #: build/C/man2/semget.2:199
712 #. this error can occur if we have a name of the (nonportable) form
713 #. /dir/name, and the directory /dev/shm/dir does not exist.
715 #: build/C/man3/sem_open.3:167
717 "The B<O_CREAT> flag was not specified in I<oflag> and no semaphore with this "
718 "I<name> exists; or, B<O_CREAT> was specified, but I<name> wasn't well formed."
720 "I<oflag> に B<O_CREAT> フラグが指定されておらず、 I<name> という名前のセマ"
721 "フォも存在しない。 または、 B<O_CREAT> が指定されたが、 I<name> が適切な形式"
725 #: build/C/man3/sem_open.3:167 build/C/man2/semget.2:207
726 #: build/C/man2/semop.2:379
732 #: build/C/man3/sem_open.3:170
733 msgid "Insufficient memory."
737 #: build/C/man3/sem_open.3:179
739 "B<sem_close>(3), B<sem_getvalue>(3), B<sem_post>(3), B<sem_unlink>(3), "
740 "B<sem_wait>(3), B<sem_overview>(7)"
742 "B<sem_close>(3), B<sem_getvalue>(3), B<sem_post>(3), B<sem_unlink>(3), "
743 "B<sem_wait>(3), B<sem_overview>(7)"
746 #: build/C/man7/sem_overview.7:26
749 msgstr "SEM_OVERVIEW"
752 #: build/C/man7/sem_overview.7:29
754 #| msgid "sem_overview - Overview of POSIX semaphores"
755 msgid "sem_overview - overview of POSIX semaphores"
756 msgstr "sem_overview - POSIX セマフォの概要"
759 #: build/C/man7/sem_overview.7:31
761 "POSIX semaphores allow processes and threads to synchronize their actions."
763 "POSIX セマフォを使用すると、プロセスやスレッド間でその動作を 同期させることが"
767 #: build/C/man7/sem_overview.7:41
769 "A semaphore is an integer whose value is never allowed to fall below zero. "
770 "Two operations can be performed on semaphores: increment the semaphore value "
771 "by one (B<sem_post>(3)); and decrement the semaphore value by one "
772 "(B<sem_wait>(3)). If the value of a semaphore is currently zero, then a "
773 "B<sem_wait>(3) operation will block until the value becomes greater than "
776 "セマフォは整数であり、その値は決して 0 未満になることは許されない。 セマフォ"
777 "に対してできる操作は 2 つである: セマフォ値を 1 増やす (B<sem_post>(3)); セマ"
778 "フォ値を 1 減らす (B<sem_wait>(3))。 セマフォの値がすでに 0 の場合、セマフォ"
779 "値が 0 より大きくなるまで B<sem_wait>(3) 操作は停止 (block) する。"
782 #: build/C/man7/sem_overview.7:44
784 "POSIX semaphores come in two forms: named semaphores and unnamed semaphores."
786 "POSIX セマフォには、名前付きセマフォ (named semaphore) と 名前なしセマフォ "
787 "(unnamed semaphore) の 2つの形がある。"
790 #: build/C/man7/sem_overview.7:44
792 msgid "B<Named semaphores>"
795 #. glibc allows the initial slash to be omitted, and makes
796 #. multiple initial slashes equivalent to a single slash.
797 #. This differs from the implementation of POSIX message queues.
798 #. glibc allows subdirectory components in the name, in which
799 #. case the subdirectory tree must exist under /dev/shm, and
800 #. the fist subdirectory component must exist as the name
801 #. sem.name, and all of the subdirectory components must allow the
802 #. required permissions if a user wants to create a semaphore
803 #. object in a subdirectory.
805 #: build/C/man7/sem_overview.7:64
807 "A named semaphore is identified by a name of the form I</somename>; that is, "
808 "a null-terminated string of up to B<NAME_MAX>I<-4> (i.e., 251) characters "
809 "consisting of an initial slash, followed by one or more characters, none of "
810 "which are slashes. Two processes can operate on the same named semaphore by "
811 "passing the same name to B<sem_open>(3)."
813 "名前付きセマフォは I</somename> という形式の名前で識別される。 その名前は、最"
814 "大で B<NAME_MAX>I<-4> (すなわち 251) 文字の NULL 終端された文字列で、 スラッ"
815 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式である。 B<sem_open>"
816 "(3) に同じ名前を渡すことにより、2 つのプロセス間で同じ名前のセマフォ に対し"
820 #: build/C/man7/sem_overview.7:79
822 "The B<sem_open>(3) function creates a new named semaphore or opens an "
823 "existing named semaphore. After the semaphore has been opened, it can be "
824 "operated on using B<sem_post>(3) and B<sem_wait>(3). When a process has "
825 "finished using the semaphore, it can use B<sem_close>(3) to close the "
826 "semaphore. When all processes have finished using the semaphore, it can be "
827 "removed from the system using B<sem_unlink>(3)."
829 "B<sem_open>(3) 関数は、新しい名前付きセマフォを作成するか、既に存在する名前"
830 "付き セマフォをオープンする。 セマフォをオープンした後は、 B<sem_post>(3) "
831 "と B<sem_wait>(3) を使ってセマフォを操作できる。 プロセスがセマフォの使用を"
832 "終えた際は、 B<sem_close>(3) を使ってセマフォをクローズできる。 あるセマフォ"
833 "をどのプロセスも使用しなくなると、 B<sem_unlink>(3) を使ってそのセマフォをシ"
837 #: build/C/man7/sem_overview.7:79
839 msgid "B<Unnamed semaphores (memory-based semaphores)>"
840 msgstr "B<名前なしセマフォ (メモリベース・セマフォ)>"
843 #: build/C/man7/sem_overview.7:94
845 "An unnamed semaphore does not have a name. Instead the semaphore is placed "
846 "in a region of memory that is shared between multiple threads (a I<thread-"
847 "shared semaphore>) or processes (a I<process-shared semaphore>). A thread-"
848 "shared semaphore is placed in an area of memory shared between the threads "
849 "of a process, for example, a global variable. A process-shared semaphore "
850 "must be placed in a shared memory region (e.g., a System V shared memory "
851 "segment created using B<shmget>(2), or a POSIX shared memory object built "
852 "created using B<shm_open>(3))."
854 "名前なしセマフォは名前を持たない。その代わり、セマフォは、 複数スレッド間で共"
855 "有されるメモリ領域、もしくは複数プロセス間で 共有されたメモリ領域に置かれる "
856 "(前者を I<スレッド共有セマフォ (thread-shared semaphore)>、 後者を I<プロセス"
857 "共有セマフォ (process-shared semaphore)> と呼ぶ)。スレッド共有セマフォは、同"
858 "じプロセス内のスレッド間で共有される メモリ領域、例えば大域変数 (global "
859 "variable) に配置される。 プロセス共有セマフォは、共有メモリ領域 (例えば、 "
860 "B<shmget>(2) を使って作成できる System V 共有メモリ・セグメントや "
861 "B<shm_open>(3) を使って作成できる POSIX 共有メモリ・オブジェクト) 内に配置"
865 #: build/C/man7/sem_overview.7:105
867 "Before being used, an unnamed semaphore must be initialized using B<sem_init>"
868 "(3). It can then be operated on using B<sem_post>(3) and B<sem_wait>(3). "
869 "When the semaphore is no longer required, and before the memory in which it "
870 "is located is deallocated, the semaphore should be destroyed using "
873 "名前なしセマフォは、使用する前に B<sem_init>(3) を使って初期化しなければなら"
874 "ない。 セマフォは B<sem_post>(3) と B<sem_wait>(3) を使って操作できる。 セ"
875 "マフォがもはや必要なくなったときや、 セマフォが置かれているメモリを解放する前"
876 "には、 B<sem_destroy>(3) を使ってセマフォを破棄すべきである。"
879 #: build/C/man7/sem_overview.7:108
881 "The remainder of this section describes some specific details of the Linux "
882 "implementation of POSIX semaphores."
884 "この節の残りでは、POSIX セマフォの Linux の実装の詳細 について説明する。"
887 #: build/C/man7/sem_overview.7:108
893 #: build/C/man7/sem_overview.7:114
895 "Prior to kernel 2.6, Linux only supported unnamed, thread-shared "
896 "semaphores. On a system with Linux 2.6 and a glibc that provides the NPTL "
897 "threading implementation, a complete implementation of POSIX semaphores is "
900 "バージョン 2.6 より前のカーネルでは、Linux は 名前なしのスレッド共有セマフォ"
901 "のみをサポートしていた。 Linux 2.6 と NPTL スレッド実装を提供している glibc "
902 "が入った システムでは、POSIX セマフォの完全な実装が提供される。"
905 #: build/C/man7/sem_overview.7:114
911 #: build/C/man7/sem_overview.7:119
913 "POSIX named semaphores have kernel persistence: if not removed by "
914 "B<sem_unlink>(3), a semaphore will exist until the system is shut down."
916 "POSIX 名前付きセマフォはカーネル内で保持される。 B<sem_unlink>(3) で削除され"
917 "なければ、セマフォは システムがシャットダウンされるまで存在し続ける。"
920 #: build/C/man7/sem_overview.7:119
926 #: build/C/man7/sem_overview.7:124
929 #| "Programs using the POSIX semaphores API must be compiled with I<cc -lrt> "
930 #| "to link against the real-time library, I<librt>."
932 "Programs using the POSIX semaphores API must be compiled with I<cc -pthread> "
933 "to link against the real-time library, I<librt>."
935 "POSIX セマフォ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアルタ"
936 "イムライブラリ I<librt> とリンクしなければならない。"
939 #: build/C/man7/sem_overview.7:124
941 msgid "Accessing named semaphores via the file system"
942 msgstr "ファイルシステム経由での名前付きセマフォへのアクセス"
945 #: build/C/man7/sem_overview.7:135
947 "On Linux, named semaphores are created in a virtual file system, normally "
948 "mounted under I</dev/shm>, with names of the form B<sem.>I<somename>. (This "
949 "is the reason that semaphore names are limited to B<NAME_MAX>I<-4> rather "
950 "than B<NAME_MAX> characters.)"
952 "Linux では、名前付きセマフォは仮想ファイルシステム (virtual file system) 内"
953 "に B<sem.>I<somename> という形の名前で作成される。仮想ファイルシステムは通常 "
954 "I</dev/shm> 以下にマウントされる。 (これが、セマフォの名前の文字数の上限が "
955 "B<NAME_MAX> ではなく B<NAME_MAX>I<-4> となっている理由である。)"
958 #: build/C/man7/sem_overview.7:138
960 "Since Linux 2.6.19, ACLs can be placed on files under this directory, to "
961 "control object permissions on a per-user and per-group basis."
963 "Linux 2.6.19 以降では、このディレクトリ配下のファイルに対して ACL を 設定で"
964 "き、オブジェクトへの許可をユーザ単位、グループ単位で制御することが できる。"
967 #: build/C/man7/sem_overview.7:149
969 "System V semaphores (B<semget>(2), B<semop>(2), etc.) are an older semaphore "
970 "API. POSIX semaphores provide a simpler, and better designed interface than "
971 "System V semaphores; on the other hand POSIX semaphores are less widely "
972 "available (especially on older systems) than System V semaphores."
974 "System V セマフォ (B<semget>(2), B<semop>(2) など) は古いセマフォ API であ"
975 "る。 POSIX セマフォは System V よりも 簡単で、うまく設計されたインタフェース"
976 "を提供している。 一方で、POSIX セマフォは System V セマフォと比べると 利用で"
977 "きるシステムが少ない (特に、古いシステムでは少ない)。"
980 #: build/C/man7/sem_overview.7:149 build/C/man3/sem_post.3:67
981 #: build/C/man3/sem_wait.3:153 build/C/man2/semop.2:506
987 #: build/C/man7/sem_overview.7:152
989 "An example of the use of various POSIX semaphore functions is shown in "
992 "各種の POSIX セマフォ関数を使用した例が B<sem_wait>(3) に記載されている。"
995 #: build/C/man7/sem_overview.7:162
997 "B<sem_close>(3), B<sem_destroy>(3), B<sem_getvalue>(3), B<sem_init>(3), "
998 "B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), B<sem_wait>(3), B<pthreads>"
1001 "B<sem_close>(3), B<sem_destroy>(3), B<sem_getvalue>(3), B<sem_init>(3), "
1002 "B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), B<sem_wait>(3), B<pthreads>"
1006 #: build/C/man3/sem_post.3:26
1012 #: build/C/man3/sem_post.3:29
1013 msgid "sem_post - unlock a semaphore"
1014 msgstr "sem_post - セマフォのロックを解除する"
1017 #: build/C/man3/sem_post.3:34
1019 msgid "B<int sem_post(sem_t *>I<sem>B<);>\n"
1020 msgstr "B<int sem_post(sem_t *>I<sem>B<);>\n"
1023 #: build/C/man3/sem_post.3:45
1025 "B<sem_post>() increments (unlocks) the semaphore pointed to by I<sem>. If "
1026 "the semaphore's value consequently becomes greater than zero, then another "
1027 "process or thread blocked in a B<sem_wait>(3) call will be woken up and "
1028 "proceed to lock the semaphore."
1030 "B<sem_post>() は、 I<sem> が指すセマフォの値を 1 増やす (ロックを解除する)。"
1031 "その結果、 セマフォの値は 0 より大きな値に変化し、 B<sem_wait>(3) で停止して"
1032 "いる別のプロセスやスレッドが呼び起こされ、 セマフォをロックできるようになる。"
1035 #: build/C/man3/sem_post.3:52
1037 "B<sem_post>() returns 0 on success; on error, the value of the semaphore is "
1038 "left unchanged, -1 is returned, and I<errno> is set to indicate the error."
1040 "成功すると、 B<sem_post>() は 0 を返す。エラーの場合、セマフォの値は変更せず"
1041 "に、 -1 を返し、 I<errno> にエラーを示す値をセットする。"
1044 #: build/C/man3/sem_post.3:57
1046 msgid "B<EOVERFLOW>"
1047 msgstr "B<EOVERFLOW>"
1049 #. Added in POSIX.1-2008 TC1 (Austin Interpretation 213)
1051 #: build/C/man3/sem_post.3:61
1052 msgid "The maximum allowable value for a semaphore would be exceeded."
1053 msgstr "一つのセマフォで使用できる最大値を超えてしまうところであった。"
1056 #: build/C/man3/sem_post.3:67
1058 "B<sem_post>() is async-signal-safe: it may be safely called within a signal "
1061 "B<sem_post>() は async-signal-safe である。 つまり、シグナルハンドラの中でも"
1065 #: build/C/man3/sem_post.3:70
1066 msgid "See B<sem_wait>(3)."
1067 msgstr "B<sem_wait>(3) 参照。"
1070 #: build/C/man3/sem_post.3:74
1071 msgid "B<sem_getvalue>(3), B<sem_wait>(3), B<sem_overview>(7)"
1072 msgstr "B<sem_getvalue>(3), B<sem_wait>(3), B<sem_overview>(7)"
1075 #: build/C/man3/sem_unlink.3:26
1081 #: build/C/man3/sem_unlink.3:29
1082 msgid "sem_unlink - remove a named semaphore"
1083 msgstr "sem_unlink - 名前付きセマフォを削除する"
1086 #: build/C/man3/sem_unlink.3:34
1088 msgid "B<int sem_unlink(const char *>I<name>B<);>\n"
1089 msgstr "B<int sem_unlink(const char *>I<name>B<);>\n"
1092 #: build/C/man3/sem_unlink.3:44
1094 "B<sem_unlink>() removes the named semaphore referred to by I<name>. The "
1095 "semaphore name is removed immediately. The semaphore is destroyed once all "
1096 "other processes that have the semaphore open close it."
1098 "B<sem_unlink>() は、 I<name> で参照される名前付きセマフォを削除する。 セマ"
1099 "フォの名前は直ちに削除される。 このセマフォをオープンしている他のすべてのプロ"
1100 "セスがセマフォを 閉じて初めてセマフォの削除が行われる。"
1103 #: build/C/man3/sem_unlink.3:50
1105 "On success B<sem_unlink>() returns 0; on error, -1 is returned, with "
1106 "I<errno> set to indicate the error."
1108 "成功すると、 B<sem_unlink>() は 0 を返す。エラーの場合、-1 を返し、 "
1109 "I<errno> にエラーを示す値をセットする。"
1112 #: build/C/man3/sem_unlink.3:54
1113 msgid "The caller does not have permission to unlink this semaphore."
1114 msgstr "呼び出し元にはこのセマフォを削除する許可がない。"
1117 #: build/C/man3/sem_unlink.3:62
1118 msgid "There is no semaphore with the given I<name>."
1119 msgstr "指定された名前 I<name> のセマフォが存在しない。"
1122 #: build/C/man3/sem_unlink.3:70
1124 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_wait>(3), "
1125 "B<sem_overview>(7)"
1127 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_wait>(3), "
1128 "B<sem_overview>(7)"
1131 #: build/C/man3/sem_wait.3:26
1137 #: build/C/man3/sem_wait.3:29
1138 msgid "sem_wait, sem_timedwait, sem_trywait - lock a semaphore"
1139 msgstr "sem_wait, sem_timedwait, sem_trywait - セマフォをロックする"
1142 #: build/C/man3/sem_wait.3:34
1144 msgid "B<int sem_wait(sem_t *>I<sem>B<);>\n"
1145 msgstr "B<int sem_wait(sem_t *>I<sem>B<);>\n"
1148 #: build/C/man3/sem_wait.3:36
1150 msgid "B<int sem_trywait(sem_t *>I<sem>B<);>\n"
1151 msgstr "B<int sem_trywait(sem_t *>I<sem>B<);>\n"
1154 #: build/C/man3/sem_wait.3:38
1156 msgid "B<int sem_timedwait(sem_t *>I<sem>B<, const struct timespec *>I<abs_timeout>B<);>\n"
1157 msgstr "B<int sem_timedwait(sem_t *>I<sem>B<, const struct timespec *>I<abs_timeout>B<);>\n"
1160 #: build/C/man3/sem_wait.3:45 build/C/man2/semop.2:53
1162 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1163 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1166 #: build/C/man3/sem_wait.3:49
1168 "B<sem_timedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
1171 "B<sem_timedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
1175 #: build/C/man3/sem_wait.3:59
1177 "B<sem_wait>() decrements (locks) the semaphore pointed to by I<sem>. If "
1178 "the semaphore's value is greater than zero, then the decrement proceeds, and "
1179 "the function returns, immediately. If the semaphore currently has the value "
1180 "zero, then the call blocks until either it becomes possible to perform the "
1181 "decrement (i.e., the semaphore value rises above zero), or a signal handler "
1182 "interrupts the call."
1184 "B<sem_wait>() は I<sem> が指すセマフォの値を 1 減らす (ロックする)。 セマ"
1185 "フォの値が 0 より大きい場合、減算が実行され、関数は直ちに復帰する。 セマフォ"
1186 "の現在値が 0 の場合には、減算を実行できるようになる (つまり、セマフォの値が "
1187 "0 より大きな値になる) まで、もしくは シグナルハンドラによって呼び出しが中断さ"
1188 "れるまで、 関数呼び出しは停止 (block) する。"
1191 #: build/C/man3/sem_wait.3:69
1193 "B<sem_trywait>() is the same as B<sem_wait>(), except that if the decrement "
1194 "cannot be immediately performed, then call returns an error (I<errno> set to "
1195 "B<EAGAIN>) instead of blocking."
1197 "B<sem_trywait>() は B<sem_wait>() と同じだが、セマフォ値の減算をすぐに実行"
1198 "できなかった場合に、 停止 (block) するのではなくエラーで復帰する (I<errno> "
1199 "に B<EAGAIN> がセットされる) 点が異なる。"
1202 #: build/C/man3/sem_wait.3:82
1204 "B<sem_timedwait>() is the same as B<sem_wait>(), except that I<abs_timeout> "
1205 "specifies a limit on the amount of time that the call should block if the "
1206 "decrement cannot be immediately performed. The I<abs_timeout> argument "
1207 "points to a structure that specifies an absolute timeout in seconds and "
1208 "nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This "
1209 "structure is defined as follows:"
1211 "B<sem_timedwait>() は B<sem_wait>() と同じだが、セマフォ値の減算をすぐに実"
1212 "行できなかった場合に 関数呼び出しが停止する時間の上限を I<abs_timeout> で指定"
1213 "する点が異なる。 I<abs_timeout> 引き数は、タイムアウト時刻を指定する構造体へ"
1214 "のポインタである。 この構造体には、タイムアウト時刻を時刻紀元 (Epoch; "
1215 "1970-01-01 00:00:00 +0000 (UTC)) からの 経過時間 (秒+ナノ秒) で指定する。 構"
1219 #: build/C/man3/sem_wait.3:89
1222 "struct timespec {\n"
1223 " time_t tv_sec; /* Seconds */\n"
1224 " long tv_nsec; /* Nanoseconds [0 .. 999999999] */\n"
1227 "struct timespec {\n"
1228 " time_t tv_sec; /* Seconds */\n"
1229 " long tv_nsec; /* Nanoseconds [0 .. 999999999] */\n"
1233 #: build/C/man3/sem_wait.3:100
1235 "If the timeout has already expired by the time of the call, and the "
1236 "semaphore could not be locked immediately, then B<sem_timedwait>() fails "
1237 "with a timeout error (I<errno> set to B<ETIMEDOUT>)."
1239 "関数呼び出し時点ですでにタイムアウトに指定した時刻が過ぎており、 かつセマフォ"
1240 "をすぐにロックできなかった場合は、 B<sem_timedwait>() はタイムアウトエラー "
1241 "(I<errno> に B<ETIMEDOUT> がセットされる) で失敗する。"
1244 #: build/C/man3/sem_wait.3:108
1246 "If the operation can be performed immediately, then B<sem_timedwait>() "
1247 "never fails with a timeout error, regardless of the value of "
1248 "I<abs_timeout>. Furthermore, the validity of I<abs_timeout> is not checked "
1251 "セマフォ操作がすぐに実行できるときは、 I<abs_timeout> がどんな値であっても "
1252 "B<sem_timedwait>() が失敗することは決してない。さらにいうと、この場合には "
1253 "I<abs_timeout> の正当性の検査は行われない。"
1256 #: build/C/man3/sem_wait.3:114
1258 "All of these functions return 0 on success; on error, the value of the "
1259 "semaphore is left unchanged, -1 is returned, and I<errno> is set to indicate "
1262 "成功すると、これらの関数は 0 を返す。 エラーの場合、セマフォの値を変更せず"
1263 "に、-1 を返し、 I<errno> にエラーを示す値をセットする。"
1266 #: build/C/man3/sem_wait.3:115 build/C/man2/semop.2:368
1272 #: build/C/man3/sem_wait.3:119
1273 msgid "The call was interrupted by a signal handler; see B<signal>(7)."
1274 msgstr "呼び出しはシグナルハンドラにより中断された。 B<signal>(7) 参照。"
1277 #: build/C/man3/sem_wait.3:126
1278 msgid "The following additional error can occur for B<sem_trywait>():"
1279 msgstr "B<sem_trywait>() の場合には、上記に加えて以下のエラーも起こる。"
1282 #: build/C/man3/sem_wait.3:126 build/C/man2/semop.2:343
1288 #: build/C/man3/sem_wait.3:130
1290 "The operation could not be performed without blocking (i.e., the semaphore "
1291 "currently has the value zero)."
1293 "停止 (block) せずにロック操作を完了できなかった (つまり、 セマフォの現在の値"
1297 #: build/C/man3/sem_wait.3:133
1298 msgid "The following additional errors can occur for B<sem_timedwait>():"
1299 msgstr "B<sem_timedwait>() の場合、以下のエラーも起こる。"
1302 #: build/C/man3/sem_wait.3:138
1304 "The value of I<abs_timeout.tv_nsecs> is less than 0, or greater than or "
1305 "equal to 1000 million."
1307 "I<abs_timeout.tv_nsecs> の値が 0 未満、もしくは 1,000,000,000 以上である。"
1310 #: build/C/man3/sem_wait.3:138
1312 msgid "B<ETIMEDOUT>"
1313 msgstr "B<ETIMEDOUT>"
1315 #. POSIX.1-2001 also allows EDEADLK -- "A deadlock condition
1316 #. was detected", but this does not occur on Linux(?).
1318 #: build/C/man3/sem_wait.3:143
1319 msgid "The call timed out before the semaphore could be locked."
1320 msgstr "セマフォのロックに成功する前に時間切れとなった。"
1322 #. sem_wait() is always interrupted on most other implementations,
1323 #. but on FreeBSD 5.4 SA_RESTART does cause restarting.
1325 #: build/C/man3/sem_wait.3:153
1327 "A signal handler always interrupts a blocked call to one of these functions, "
1328 "regardless of the use of the B<sigaction>(2) B<SA_RESTART> flag."
1330 "シグナルハンドラは、 B<sigaction>(2) の B<SA_RESTART> フラグを使用しているか"
1331 "どうかに関わらず、これらの関数の呼び出しが 停止している場合、シグナルハンドラ"
1335 #: build/C/man3/sem_wait.3:172
1337 "The (somewhat trivial) program shown below operates on an unnamed "
1338 "semaphore. The program expects two command-line arguments. The first "
1339 "argument specifies a seconds value that is used to set an alarm timer to "
1340 "generate a B<SIGALRM> signal. This handler performs a B<sem_post>(3) to "
1341 "increment the semaphore that is being waited on in I<main()> using "
1342 "B<sem_timedwait>(). The second command-line argument specifies the length "
1343 "of the timeout, in seconds, for B<sem_timedwait>(). The following shows "
1344 "what happens on two different runs of the program:"
1346 "以下に示す (ちょっとした) プログラムは名前なしセマフォの操作を行う。 プログラ"
1347 "ムはコマンドライン引き数を 2 つ取る。 最初の引き数には、 B<SIGALRM> シグナル"
1348 "を生成するためのアラームタイマーの設定に使われる値を 秒単位で指定する。このシ"
1349 "グナルハンドラは、 I<main()> 内で B<sem_timedwait>() を使って待っているセマ"
1350 "フォを、 B<sem_post>(3) を使って加算する。 2番目の引き数には、 "
1351 "B<sem_timedwait>() に渡すタイムアウトまでの時間を秒単位で指定する。"
1354 #: build/C/man3/sem_wait.3:182
1357 "$B< ./a.out 2 3>\n"
1358 "About to call sem_timedwait()\n"
1359 "sem_post() from handler\n"
1360 "sem_timedwait() succeeded\n"
1361 "$B< ./a.out 2 1>\n"
1362 "About to call sem_timedwait()\n"
1363 "sem_timedwait() timed out\n"
1365 "$B< ./a.out 2 3>\n"
1366 "About to call sem_timedwait()\n"
1367 "sem_post() from handler\n"
1368 "sem_timedwait() succeeded\n"
1369 "$B< ./a.out 2 1>\n"
1370 "About to call sem_timedwait()\n"
1371 "sem_timedwait() timed out\n"
1374 #: build/C/man3/sem_wait.3:184
1376 msgid "Program source"
1380 #: build/C/man3/sem_wait.3:195
1383 "#include E<lt>unistd.hE<gt>\n"
1384 "#include E<lt>stdio.hE<gt>\n"
1385 "#include E<lt>stdlib.hE<gt>\n"
1386 "#include E<lt>semaphore.hE<gt>\n"
1387 "#include E<lt>time.hE<gt>\n"
1388 "#include E<lt>assert.hE<gt>\n"
1389 "#include E<lt>errno.hE<gt>\n"
1390 "#include E<lt>signal.hE<gt>\n"
1392 "#include E<lt>unistd.hE<gt>\n"
1393 "#include E<lt>stdio.hE<gt>\n"
1394 "#include E<lt>stdlib.hE<gt>\n"
1395 "#include E<lt>semaphore.hE<gt>\n"
1396 "#include E<lt>time.hE<gt>\n"
1397 "#include E<lt>assert.hE<gt>\n"
1398 "#include E<lt>errno.hE<gt>\n"
1399 "#include E<lt>signal.hE<gt>\n"
1402 #: build/C/man3/sem_wait.3:197
1404 msgid "sem_t sem;\n"
1405 msgstr "sem_t sem;\n"
1408 #: build/C/man3/sem_wait.3:200
1411 "#define handle_error(msg) \\e\n"
1412 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1414 "#define handle_error(msg) \\e\n"
1415 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1418 #: build/C/man3/sem_wait.3:210
1422 "handler(int sig)\n"
1424 " write(STDOUT_FILENO, \"sem_post() from handler\\en\", 24);\n"
1425 " if (sem_post(&sem) == -1) {\n"
1426 " write(STDERR_FILENO, \"sem_post() failed\\en\", 18);\n"
1427 " _exit(EXIT_FAILURE);\n"
1432 "handler(int sig)\n"
1434 " write(STDOUT_FILENO, \"sem_post() from handler\\en\", 24);\n"
1435 " if (sem_post(&sem) == -1) {\n"
1436 " write(STDERR_FILENO, \"sem_post() failed\\en\", 18);\n"
1437 " _exit(EXIT_FAILURE);\n"
1442 #: build/C/man3/sem_wait.3:217
1446 "main(int argc, char *argv[])\n"
1448 " struct sigaction sa;\n"
1449 " struct timespec ts;\n"
1453 "main(int argc, char *argv[])\n"
1455 " struct sigaction sa;\n"
1456 " struct timespec ts;\n"
1460 #: build/C/man3/sem_wait.3:223
1463 " if (argc != 3) {\n"
1464 " fprintf(stderr, \"Usage: %s E<lt>alarm-secsE<gt> E<lt>wait-secsE<gt>\\en\",\n"
1466 " exit(EXIT_FAILURE);\n"
1469 " if (argc != 3) {\n"
1470 " fprintf(stderr, \"Usage: %s E<lt>alarm-secsE<gt> E<lt>wait-secsE<gt>\\en\",\n"
1472 " exit(EXIT_FAILURE);\n"
1476 #: build/C/man3/sem_wait.3:226
1479 " if (sem_init(&sem, 0, 0) == -1)\n"
1480 " handle_error(\"sem_init\");\n"
1482 " if (sem_init(&sem, 0, 0) == -1)\n"
1483 " handle_error(\"sem_init\");\n"
1486 #: build/C/man3/sem_wait.3:228
1488 msgid " /* Establish SIGALRM handler; set alarm timer using argv[1] */\n"
1489 msgstr " /* Establish SIGALRM handler; set alarm timer using argv[1] */\n"
1492 #: build/C/man3/sem_wait.3:234
1495 " sa.sa_handler = handler;\n"
1496 " sigemptyset(&sa.sa_mask);\n"
1497 " sa.sa_flags = 0;\n"
1498 " if (sigaction(SIGALRM, &sa, NULL) == -1)\n"
1499 " handle_error(\"sigaction\");\n"
1501 " sa.sa_handler = handler;\n"
1502 " sigemptyset(&sa.sa_mask);\n"
1503 " sa.sa_flags = 0;\n"
1504 " if (sigaction(SIGALRM, &sa, NULL) == -1)\n"
1505 " handle_error(\"sigaction\");\n"
1508 #: build/C/man3/sem_wait.3:236
1510 msgid " alarm(atoi(argv[1]));\n"
1511 msgstr " alarm(atoi(argv[1]));\n"
1514 #: build/C/man3/sem_wait.3:239
1517 " /* Calculate relative interval as current time plus\n"
1518 " number of seconds given argv[2] */\n"
1520 " /* Calculate relative interval as current time plus\n"
1521 " number of seconds given argv[2] */\n"
1524 #: build/C/man3/sem_wait.3:242
1527 " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n"
1528 " handle_error(\"clock_gettime\");\n"
1530 " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n"
1531 " handle_error(\"clock_gettime\");\n"
1534 #: build/C/man3/sem_wait.3:244
1536 msgid " ts.tv_sec += atoi(argv[2]);\n"
1537 msgstr " ts.tv_sec += atoi(argv[2]);\n"
1540 #: build/C/man3/sem_wait.3:248
1543 " printf(\"main() about to call sem_timedwait()\\en\");\n"
1544 " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n"
1545 " continue; /* Restart if interrupted by handler */\n"
1547 " printf(\"main() about to call sem_timedwait()\\en\");\n"
1548 " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n"
1549 " continue; /* Restart if interrupted by handler */\n"
1552 #: build/C/man3/sem_wait.3:250
1554 msgid " /* Check what happened */\n"
1555 msgstr " /* Check what happened */\n"
1558 #: build/C/man3/sem_wait.3:258
1562 " if (errno == ETIMEDOUT)\n"
1563 " printf(\"sem_timedwait() timed out\\en\");\n"
1565 " perror(\"sem_timedwait\");\n"
1567 " printf(\"sem_timedwait() succeeded\\en\");\n"
1570 " if (errno == ETIMEDOUT)\n"
1571 " printf(\"sem_timedwait() timed out\\en\");\n"
1573 " perror(\"sem_timedwait\");\n"
1575 " printf(\"sem_timedwait() succeeded\\en\");\n"
1578 #: build/C/man3/sem_wait.3:261
1581 " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n"
1584 " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n"
1588 #: build/C/man3/sem_wait.3:268
1590 "B<clock_gettime>(2), B<sem_getvalue>(3), B<sem_post>(3), B<sem_overview>(7), "
1593 "B<clock_gettime>(2), B<sem_getvalue>(3), B<sem_post>(3), B<sem_overview>(7), "
1597 #: build/C/man2/semctl.2:41
1603 #: build/C/man2/semctl.2:41 build/C/man2/semget.2:36
1605 #| msgid "2012-05-10"
1610 #: build/C/man2/semctl.2:44
1611 msgid "semctl - semaphore control operations"
1612 msgstr "semctl - セマフォの制御操作を行なう"
1615 #: build/C/man2/semctl.2:49 build/C/man2/semget.2:44 build/C/man2/semop.2:43
1618 "B<#include E<lt>sys/types.hE<gt>>\n"
1619 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1620 "B<#include E<lt>sys/sem.hE<gt>>\n"
1622 "B<#include E<lt>sys/types.hE<gt>>\n"
1623 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1624 "B<#include E<lt>sys/sem.hE<gt>>\n"
1627 #: build/C/man2/semctl.2:51
1629 msgid "B<int semctl(int >I<semid>B<, int >I<semnum>B<, int >I<cmd>B<, ...);>\n"
1630 msgstr "B<int semctl(int >I<semid>B<, int >I<semnum>B<, int >I<cmd>B<, ...);>\n"
1633 #: build/C/man2/semctl.2:62
1635 "B<semctl>() performs the control operation specified by I<cmd> on the "
1636 "semaphore set identified by I<semid>, or on the I<semnum>-th semaphore of "
1637 "that set. (The semaphores in a set are numbered starting at 0.)"
1639 "B<semctl>() は、 I<semid> で指定されたセマフォ集合 (semaphore set) またはセ"
1640 "マフォ集合の I<semnun> 番目のセマフォに対して、 I<cmd> で指定された制御操作を"
1641 "行なう (集合内のセマフォの番号は 0 から始まる)。"
1644 #: build/C/man2/semctl.2:68
1646 "This function has three or four arguments, depending on I<cmd>. When there "
1647 "are four, the fourth has the type I<union semun>. The I<calling program> "
1648 "must define this union as follows:"
1650 "この関数は、 I<cmd> の値に依存して、3 個または 4 個の引き数を持つ。 引き数が "
1651 "4 個の場合、第 4 引き数の型は I<union semun> である。 I<呼び出し元プログラム>"
1652 "は、 この共用体 (union) を以下のように定義しなければならない。"
1655 #: build/C/man2/semctl.2:78
1659 " int val; /* Value for SETVAL */\n"
1660 " struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */\n"
1661 " unsigned short *array; /* Array for GETALL, SETALL */\n"
1662 " struct seminfo *__buf; /* Buffer for IPC_INFO\n"
1663 " (Linux-specific) */\n"
1667 " int val; /* SETVAL の値 */\n"
1668 " struct semid_ds *buf; /* IPC_STAT, IPC_SET 用のバッファ */\n"
1669 " unsigned short *array; /* GETALL, SETALL 用の配列 */\n"
1670 " struct seminfo *__buf; /* IPC_INFO 用のバッファ\n"
1675 #: build/C/man2/semctl.2:84
1677 "The I<semid_ds> data structure is defined in I<E<lt>sys/sem.hE<gt>> as "
1680 "I<semid_ds> データ構造体は I<E<lt>sys/sem.hE<gt>> で以下のように定義されてい"
1684 #: build/C/man2/semctl.2:93
1687 "struct semid_ds {\n"
1688 " struct ipc_perm sem_perm; /* Ownership and permissions */\n"
1689 " time_t sem_otime; /* Last semop time */\n"
1690 " time_t sem_ctime; /* Last change time */\n"
1691 " unsigned short sem_nsems; /* No. of semaphores in set */\n"
1694 "struct semid_ds {\n"
1695 " struct ipc_perm sem_perm; /* 所有権と許可 */\n"
1696 " time_t sem_otime; /* 最後の semop の時刻 */\n"
1697 " time_t sem_ctime; /* 最後に変更が行われた時刻 */\n"
1698 " unsigned short sem_nsems; /* 集合内のセマフォの数 */\n"
1702 #: build/C/man2/semctl.2:101
1705 #| "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
1706 #| "(the highlighted fields are settable using B<IPC_SET>):"
1708 "The I<ipc_perm> structure is defined as follows (the highlighted fields are "
1709 "settable using B<IPC_SET>):"
1711 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
1712 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
1715 #: build/C/man2/semctl.2:113
1718 "struct ipc_perm {\n"
1719 " key_t __key; /* Key supplied to semget(2) */\n"
1720 " uid_t B<uid>; /* Effective UID of owner */\n"
1721 " gid_t B<gid>; /* Effective GID of owner */\n"
1722 " uid_t cuid; /* Effective UID of creator */\n"
1723 " gid_t cgid; /* Effective GID of creator */\n"
1724 " unsigned short B<mode>; /* Permissions */\n"
1725 " unsigned short __seq; /* Sequence number */\n"
1728 "struct ipc_perm {\n"
1729 " key_t __key; /* semget(2) に与えられるキー */\n"
1730 " uid_t B<uid>; /* 所有者 (owner) の実効 UID */\n"
1731 " gid_t B<gid>; /* 所有者の実効 GID */\n"
1732 " uid_t cuid; /* 作成者 (creator) の実効 UID */\n"
1733 " gid_t cgid; /* 作成者の実効 GID */\n"
1734 " unsigned short B<mode>; /* 許可 */\n"
1735 " unsigned short __seq; /* シーケンス番号 */\n"
1739 #: build/C/man2/semctl.2:119
1740 msgid "Valid values for I<cmd> are:"
1741 msgstr "I<cmd> として有効な値は"
1744 #: build/C/man2/semctl.2:119
1747 msgstr "B<IPC_STAT>"
1750 #: build/C/man2/semctl.2:131
1752 "Copy information from the kernel data structure associated with I<semid> "
1753 "into the I<semid_ds> structure pointed to by I<arg.buf>. The argument "
1754 "I<semnum> is ignored. The calling process must have read permission on the "
1757 "I<semid> に関連づけられたカーネルデータ構造体の情報を I<arg.buf> で指された "
1758 "I<semid_ds> 構造体へコピーする。 I<semnum> 引き数は無視される。 呼び出したプ"
1759 "ロセスはそのセマフォ集合に対する 読み込み許可を持たなければならない。"
1762 #: build/C/man2/semctl.2:131
1768 #: build/C/man2/semctl.2:154
1770 "Write the values of some members of the I<semid_ds> structure pointed to by "
1771 "I<arg.buf> to the kernel data structure associated with this semaphore set, "
1772 "updating also its I<sem_ctime> member. The following members of the "
1773 "structure are updated: I<sem_perm.uid>, I<sem_perm.gid>, and (the least "
1774 "significant 9 bits of) I<sem_perm.mode>. The effective UID of the calling "
1775 "process must match the owner (I<sem_perm.uid>) or creator (I<sem_perm."
1776 "cuid>) of the semaphore set, or the caller must be privileged. The "
1777 "argument I<semnum> is ignored."
1779 "I<arg.buf> で指定された I<semid_ds> 構造体のメンバーのいくつかの値を、 このセ"
1780 "マフォに関連づけられたカーネルデータ構造体に書き込み、 I<sem_ctime> メンバー"
1781 "の値も更新する。 構造体の以下のメンバーが更新される: I<sem_perm.uid>, "
1782 "I<sem_perm.gid>, I<sem_perm.mode> (の最下位 9 ビット)。 呼び出したプロセスの"
1783 "実効 UID が所有者 (I<sem_perm.uid>) または作成者 (I<sem_perm.cuid>) と一致"
1784 "するか、呼び出した人が特権を持たなければならない。 I<semnum> 引き数は無視され"
1788 #: build/C/man2/semctl.2:154
1791 msgstr "B<IPC_RMID>"
1794 #: build/C/man2/semctl.2:169
1796 "Immediately remove the semaphore set, awakening all processes blocked in "
1797 "B<semop>(2) calls on the set (with an error return and I<errno> set to "
1798 "B<EIDRM>). The effective user ID of the calling process must match the "
1799 "creator or owner of the semaphore set, or the caller must be privileged. "
1800 "The argument I<semnum> is ignored."
1802 "セマフォ集合をただちに削除し、その集合上の B<semop>(2) コールでブロックされ"
1803 "ている全てのプロセスを目覚めさせる (エラー値が返されて、 I<errno> に "
1804 "B<EIDRM> が設定される)。 呼び出したプロセスの実効ユーザ ID が そのセマフォ集"
1805 "合の作成者または所有者と一致するか、 呼び出した人が特権を持たなければならな"
1806 "い。 I<semnum> 引き数は無視される。"
1809 #: build/C/man2/semctl.2:169
1811 msgid "B<IPC_INFO> (Linux-specific)"
1812 msgstr "B<IPC_INFO> (Linux 固有)"
1815 #: build/C/man2/semctl.2:181
1817 "Returns information about system-wide semaphore limits and parameters in the "
1818 "structure pointed to by I<arg.__buf>. This structure is of type I<seminfo>, "
1819 "defined in I<E<lt>sys/sem.hE<gt>> if the B<_GNU_SOURCE> feature test macro "
1822 "システム全体でのセマフォの制限とパラメータに関する情報を、 I<arg.__buf> が指"
1823 "す構造体に入れて返す。 この構造体は I<seminfo> 型である。 I<seminfo> は "
1824 "B<_GNU_SOURCE> 機能検査マクロが定義された場合に I<E<lt>sys/sem.hE<gt>> で以下"
1828 #: build/C/man2/semctl.2:203
1831 "struct seminfo {\n"
1832 " int semmap; /* Number of entries in semaphore\n"
1833 " map; unused within kernel */\n"
1834 " int semmni; /* Maximum number of semaphore sets */\n"
1835 " int semmns; /* Maximum number of semaphores in all\n"
1836 " semaphore sets */\n"
1837 " int semmnu; /* System-wide maximum number of undo\n"
1838 " structures; unused within kernel */\n"
1839 " int semmsl; /* Maximum number of semaphores in a\n"
1841 " int semopm; /* Maximum number of operations for\n"
1843 " int semume; /* Maximum number of undo entries per\n"
1844 " process; unused within kernel */\n"
1845 " int semusz; /* Size of struct sem_undo */\n"
1846 " int semvmx; /* Maximum semaphore value */\n"
1847 " int semaem; /* Max. value that can be recorded for\n"
1848 " semaphore adjustment (SEM_UNDO) */\n"
1851 "struct seminfo {\n"
1852 " int semmap; /* セマフォ・マップの最大エントリ数;\n"
1854 " int semmni; /* セマフォ集合の最大数 */\n"
1855 " int semmns; /* 全セマフォ集合中のセマフォの\n"
1857 " int semmnu; /* アンドゥ構造体のシステム全体での\n"
1858 " 最大数; カーネル内では未使用 */\n"
1859 " int semmsl; /* 一つのセマフォ集合の最大セマフォ数 */\n"
1860 " int semopm; /* semop(2) に渡す操作の最大数 */\n"
1861 " int semume; /* プロセスあたりのアンドゥ・エントリ\n"
1862 " の最大数; カーネル内では未使用 */\n"
1863 " int semusz; /* 構造体 sem_undo のサイズ */\n"
1864 " int semvmx; /* セマフォの最大値 */\n"
1865 " int semaem; /* セマフォの調整 (semaphore adjustment;\n"
1866 " SEM_UNDO) のために記録される最大値 */\n"
1870 #: build/C/man2/semctl.2:217
1872 "The I<semmsl>, I<semmns>, I<semopm>, and I<semmni> settings can be changed "
1873 "via I</proc/sys/kernel/sem>; see B<proc>(5) for details."
1875 "設定 I<semmsl>, I<semmns>, I<semopm>, I<semmni> は I</proc/sys/kernel/sem> 経"
1876 "由で変更可能である。 詳しくは B<proc>(5) を参照。"
1879 #: build/C/man2/semctl.2:217
1881 msgid "B<SEM_INFO> (Linux-specific)"
1882 msgstr "B<SEM_INFO> (Linux 固有)"
1885 #: build/C/man2/semctl.2:231
1887 "Returns a I<seminfo> structure containing the same information as for "
1888 "B<IPC_INFO>, except that the following fields are returned with information "
1889 "about system resources consumed by semaphores: the I<semusz> field returns "
1890 "the number of semaphore sets that currently exist on the system; and the "
1891 "I<semaem> field returns the total number of semaphores in all semaphore sets "
1894 "B<IPC_INFO> のときと同じ情報を格納した I<seminfo> 構造体を返す。 但し、以下の"
1895 "フィールドにはセマフォが消費しているシステム資源に 関する情報が格納される点が"
1896 "異なる。 I<semusz> フィールドは現在システム上に存在するセマフォ集合の数を返"
1897 "す。 I<semaem> フィールドはシステム上の全てのセマフォ集合に含まれる セマフォ"
1901 #: build/C/man2/semctl.2:231
1903 msgid "B<SEM_STAT> (Linux-specific)"
1904 msgstr "B<SEM_STAT> (Linux 固有)"
1907 #: build/C/man2/semctl.2:242
1909 "Returns a I<semid_ds> structure as for B<IPC_STAT>. However, the I<semid> "
1910 "argument is not a semaphore identifier, but instead an index into the "
1911 "kernel's internal array that maintains information about all semaphore sets "
1914 "B<IPC_STAT> と同じく I<semid_ds> 構造体を返す。 但し、 I<semid> 引き数は、セ"
1915 "マフォ識別子ではなく、システム上の全てのセマフォ集合 に関する情報を管理する"
1916 "カーネルの内部配列へのインデックスである。"
1919 #: build/C/man2/semctl.2:242
1925 #: build/C/man2/semctl.2:253
1927 "Return B<semval> (i.e., the current value) for all semaphores of the set "
1928 "into I<arg.array>. The argument I<semnum> is ignored. The calling process "
1929 "must have read permission on the semaphore set."
1931 "集合の全てのセマフォの B<semval> の値 (現在の値) を I<arg.array> に返す。 "
1932 "I<semnum> 引き数は無視される。 呼び出したプロセスはそのセマフォ集合に読み込み"
1936 #: build/C/man2/semctl.2:253 build/C/man2/semctl.2:351
1942 #: build/C/man2/semctl.2:266
1944 "The system call returns the value of B<semncnt> for the I<semnum>-th "
1945 "semaphore of the set (i.e., the number of processes waiting for an increase "
1946 "of B<semval> for the I<semnum>-th semaphore of the set). The calling "
1947 "process must have read permission on the semaphore set."
1949 "システムコールは集合の I<semnum> 番目のセマフォの B<semncnt> の値を返す (集合"
1950 "の I<semnum> 番目のセマフォの B<semval> の増加を待っているプロセスの数を返"
1951 "す)。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなければならな"
1955 #: build/C/man2/semctl.2:266 build/C/man2/semctl.2:355
1961 #: build/C/man2/semctl.2:279
1963 "The system call returns the value of B<sempid> for the I<semnum>-th "
1964 "semaphore of the set (i.e., the PID of the process that executed the last "
1965 "B<semop>(2) call for the I<semnum>-th semaphore of the set). The calling "
1966 "process must have read permission on the semaphore set."
1968 "システムコールは集合の I<semnum> 番目のセマフォの B<sempid> の値 (集合の "
1969 "I<semnum> 番目のセマフォに最後に B<semop>(2) コールを実行したプロセスの "
1970 "PID) を返す。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなけれ"
1974 #: build/C/man2/semctl.2:279 build/C/man2/semctl.2:359
1980 #: build/C/man2/semctl.2:287
1982 "The system call returns the value of B<semval> for the I<semnum>-th "
1983 "semaphore of the set. The calling process must have read permission on the "
1986 "システムコールは集合の I<semnum> 番目のセマフォの B<semval> の値を返す。 呼び"
1987 "出したプロセスはそのセマフォ集合に読み込み許可を持たなければならない。"
1990 #: build/C/man2/semctl.2:287 build/C/man2/semctl.2:363
1996 #: build/C/man2/semctl.2:300
1998 "The system call returns the value of B<semzcnt> for the I<semnum>-th "
1999 "semaphore of the set (i.e., the number of processes waiting for B<semval> of "
2000 "the I<semnum>-th semaphore of the set to become 0). The calling process "
2001 "must have read permission on the semaphore set."
2003 "システムコールは集合の I<semnum> 番目のセマフォの B<semzcnt> の値を返す (集合"
2004 "の I<semnum> 番目のセマフォの B<semval> の値が 0 になるのを待っているプロセス"
2005 "の数を返す)。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなけれ"
2009 #: build/C/man2/semctl.2:300
2015 #: build/C/man2/semctl.2:322
2017 "Set B<semval> for all semaphores of the set using I<arg.array>, updating "
2018 "also the I<sem_ctime> member of the I<semid_ds> structure associated with "
2019 "the set. Undo entries (see B<semop>(2)) are cleared for altered semaphores "
2020 "in all processes. If the changes to semaphore values would permit blocked "
2021 "B<semop>(2) calls in other processes to proceed, then those processes are "
2022 "woken up. The argument I<semnum> is ignored. The calling process must have "
2023 "alter (write) permission on the semaphore set."
2025 "集合の全てのセマフォの B<semval> に I<arg.array> で指定された値を設定する。 "
2026 "その集合に関連する I<semid_ds> 構造体の I<sem_ctime> メンバーの値も更新す"
2027 "る。 全てのプロセスのセマフォの変更についてのアンドゥ・エントリ (B<semop>"
2028 "(2) を参照) は消去 (clear) される。 セマフォの値の変更により、他のプロセス内"
2029 "でブロックされている B<semop>(2) コールの続行が許可されると、それらのプロセ"
2030 "スは起こされる (wake up)。 I<semnum> 引き数は無視される。 呼び出したプロセス"
2031 "はそのセマフォ集合に 変更 (書き込み) 許可を持たなければならない。"
2034 #: build/C/man2/semctl.2:322
2040 #: build/C/man2/semctl.2:340
2042 "Set the value of B<semval> to I<arg.val> for the I<semnum>-th semaphore of "
2043 "the set, updating also the I<sem_ctime> member of the I<semid_ds> structure "
2044 "associated with the set. Undo entries are cleared for altered semaphores in "
2045 "all processes. If the changes to semaphore values would permit blocked "
2046 "B<semop>(2) calls in other processes to proceed, then those processes are "
2047 "woken up. The calling process must have alter permission on the semaphore "
2050 "集合の I<semnum> 番目のセマフォの B<semval> に I<arg.val> の値を設定する。そ"
2051 "の集合に関連する I<semid_ds> 構造体の I<sem_ctime> メンバーの値も更新する。 "
2052 "全てのプロセスのセマフォの変更についてのアンドゥ・エントリは消去される。 セマ"
2053 "フォの値の変更により、他のプロセス内でブロックされている B<semop>(2) コール"
2054 "の続行が許可されると、それらのプロセスは起こされる (wake up)。 呼び出したプロ"
2055 "セスはそのセマフォ集合に 変更 (書き込み) 許可を持たなければならない。"
2058 #: build/C/man2/semctl.2:347
2059 msgid "On failure B<semctl>() returns -1 with I<errno> indicating the error."
2061 "失敗した場合、 B<semctl>() は -1 を返し、 I<errno> にそのエラーを示す。"
2064 #: build/C/man2/semctl.2:351
2066 "Otherwise the system call returns a nonnegative value depending on I<cmd> as "
2068 msgstr "そうでなければシステムコールは I<cmd> によって以下の負でない値を返す:"
2071 #: build/C/man2/semctl.2:355
2072 msgid "the value of B<semncnt>."
2073 msgstr "B<semncnt> の値"
2076 #: build/C/man2/semctl.2:359
2077 msgid "the value of B<sempid>."
2078 msgstr "B<sempid> の値"
2081 #: build/C/man2/semctl.2:363
2082 msgid "the value of B<semval>."
2083 msgstr "B<semval> の値"
2086 #: build/C/man2/semctl.2:367
2087 msgid "the value of B<semzcnt>."
2088 msgstr "B<semzcnt> の値"
2091 #: build/C/man2/semctl.2:367
2094 msgstr "B<IPC_INFO>"
2097 #: build/C/man2/semctl.2:375
2099 "the index of the highest used entry in the kernel's internal array recording "
2100 "information about all semaphore sets. (This information can be used with "
2101 "repeated B<SEM_STAT> operations to obtain information about all semaphore "
2102 "sets on the system.)"
2104 "全てのセマフォ集合に関する情報を管理しているカーネルの内部配列の使用中 エント"
2105 "リのインデックスの最大値 (この情報は、システムの全てのセマフォ集合に関する情"
2106 "報を取得するために B<SEM_STAT> 操作を繰り返し実行する際に使用できる)"
2109 #: build/C/man2/semctl.2:375
2112 msgstr "B<SEM_INFO>"
2115 #: build/C/man2/semctl.2:379
2116 msgid "As for B<IPC_INFO>."
2117 msgstr "B<IPC_INFO> と同じ"
2120 #: build/C/man2/semctl.2:379
2123 msgstr "B<SEM_STAT>"
2126 #: build/C/man2/semctl.2:383
2127 msgid "the identifier of the semaphore set whose index was given in I<semid>."
2128 msgstr "I<semid> で指定されたインデックスを持つセマフォ集合の識別子"
2131 #: build/C/man2/semctl.2:387
2132 msgid "All other I<cmd> values return 0 on success."
2133 msgstr "I<cmd> の値がそれ以外の場合、成功すると 0 が返される。"
2136 #: build/C/man2/semctl.2:391
2137 msgid "On failure, I<errno> will be set to one of the following:"
2138 msgstr "失敗した場合は I<errno> には以下の値のどれかが設定される:"
2141 #: build/C/man2/semctl.2:410
2143 "The argument I<cmd> has one of the values B<GETALL>, B<GETPID>, B<GETVAL>, "
2144 "B<GETNCNT>, B<GETZCNT>, B<IPC_STAT>, B<SEM_STAT>, B<SETALL>, or B<SETVAL> "
2145 "and the calling process does not have the required permissions on the "
2146 "semaphore set and does not have the B<CAP_IPC_OWNER> capability."
2148 "I<cmd> 引き数が B<GETALL>, B<GETPID>, B<GETVAL>, B<GETNCNT>, B<GETZCNT>, "
2149 "B<IPC_STAT>, B<SEM_STAT>, B<SETALL>, B<SETVAL> のうちの何れかの値を持ち、 呼"
2150 "び出したプロセスがセマフォに対して必要とされる許可と B<CAP_IPC_OWNER> ケーパ"
2151 "ビリティ (capability) を持っていない。"
2154 #: build/C/man2/semctl.2:410 build/C/man2/semop.2:352
2160 #: build/C/man2/semctl.2:417
2161 msgid "The address pointed to by I<arg.buf> or I<arg.array> isn't accessible."
2163 "I<arg.buf> または I<arg.array> で指されているアドレスにアクセスすることができ"
2167 #: build/C/man2/semctl.2:417 build/C/man2/semop.2:365
2173 #: build/C/man2/semctl.2:420 build/C/man2/semop.2:368
2174 msgid "The semaphore set was removed."
2175 msgstr "セマフォ集合が削除された。"
2178 #: build/C/man2/semctl.2:431
2180 "Invalid value for I<cmd> or I<semid>. Or: for a B<SEM_STAT> operation, the "
2181 "index value specified in I<semid> referred to an array slot that is "
2184 "I<cmd> または I<semid> に無効な値が指定された。 もしくは、 B<SEM_STAT> 操作の"
2185 "場合に、 I<semid> で指定されたインデックス値が現在未使用の配列のスロットを参"
2189 #: build/C/man2/semctl.2:431
2195 #: build/C/man2/semctl.2:449
2197 "The argument I<cmd> has the value B<IPC_SET> or B<IPC_RMID> but the "
2198 "effective user ID of the calling process is not the creator (as found in "
2199 "I<sem_perm.cuid>) or the owner (as found in I<sem_perm.uid>) of the "
2200 "semaphore set, and the process does not have the B<CAP_SYS_ADMIN> capability."
2202 "I<cmd> 引き数に B<IPC_SET> または B<IPC_RMID> が指定され、呼び出したプロセス"
2203 "の実効ユーザ ID がセマフォの (I<sem_perm.cuid> で見つかる) 作成者または "
2204 "(I<sem_perm.uid> で見つかる) 所有者でもなく、 プロセスが B<CAP_SYS_ADMIN> "
2208 #: build/C/man2/semctl.2:449 build/C/man2/semop.2:387
2214 #: build/C/man2/semctl.2:462
2216 "The argument I<cmd> has the value B<SETALL> or B<SETVAL> and the value to "
2217 "which B<semval> is to be set (for some semaphore of the set) is less than 0 "
2218 "or greater than the implementation limit B<SEMVMX>."
2220 "I<cmd> 引き数に B<SETALL> または B<SETVAL> が指定され、(集合のセマフォのどれ"
2221 "かの) B<semval> に設定される値が 0 より小さいか、実装の制限 B<SEMVMX> よりも"
2224 #. SVr4 documents additional error conditions EINVAL, EFBIG, ENOSPC.
2226 #: build/C/man2/semctl.2:465 build/C/man2/semget.2:223
2227 #: build/C/man2/semop.2:405
2228 msgid "SVr4, POSIX.1-2001."
2229 msgstr "SVr4, POSIX.1-2001."
2231 #. Like Linux, the FreeBSD man pages still document
2232 #. the inclusion of these header files.
2234 #: build/C/man2/semctl.2:478 build/C/man2/semget.2:236
2235 #: build/C/man2/semop.2:418
2237 "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't "
2238 "required on Linux or by any version of POSIX. However, some old "
2239 "implementations required the inclusion of these header files, and the SVID "
2240 "also documented their inclusion. Applications intended to be portable to "
2241 "such old systems may need to include these header files."
2245 #: build/C/man2/semctl.2:489
2247 "The B<IPC_INFO>, B<SEM_STAT> and B<SEM_INFO> operations are used by the "
2248 "B<ipcs>(1) program to provide information on allocated resources. In the "
2249 "future these may modified or moved to a /proc file system interface."
2251 "B<IPC_INFO>, B<SEM_STAT>, B<SEM_INFO> 操作は B<ipcs>(1) プログラムによって割"
2252 "当られた資源について情報を提供するために使用される。 将来的にはこれらは変更さ"
2253 "れるか、 /proc ファイル・システム・インタフェースに移動されるかもしれない。"
2256 #: build/C/man2/semctl.2:502
2258 "Various fields in a I<struct semid_ds> were typed as I<short> under Linux "
2259 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
2260 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
2261 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
2263 "I<構造体 semid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
2264 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
2265 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
2266 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
2269 #: build/C/man2/semctl.2:511
2271 "In some earlier versions of glibc, the I<semun> union was defined in "
2272 "I<E<lt>sys/sem.hE<gt>>, but POSIX.1-2001 requires that the caller define "
2273 "this union. On versions of glibc where this union is I<not> defined, the "
2274 "macro B<_SEM_SEMUN_UNDEFINED> is defined in I<E<lt>sys/sem.hE<gt>>."
2276 "初期のバージョンの glibc では、 I<semun> 共用体は I<E<lt>sys/sem.hE<gt>> で定"
2277 "義されていたが、 POSIX.1-2001 では呼び出し側がこの共用体を定義する必要があ"
2278 "る。 この共用体が定義されてI<いない> glibc のバージョンでは、 マクロ "
2279 "B<_SEM_SEMUN_UNDEFINED> が I<E<lt>sys/sem.hE<gt>> で定義されている。"
2282 #: build/C/man2/semctl.2:515
2284 "The following system limit on semaphore sets affects a B<semctl>() call:"
2285 msgstr "以下は B<semctl>() コールに影響するセマフォ集合のシステム制限:"
2288 #: build/C/man2/semctl.2:515 build/C/man2/semop.2:464
2294 #: build/C/man2/semctl.2:520
2295 msgid "Maximum value for B<semval>: implementation dependent (32767)."
2296 msgstr "B<semval> の最大値 : 実装依存 (32767)。"
2299 #: build/C/man2/semctl.2:524
2301 "For greater portability it is best to always call B<semctl>() with four "
2304 "移植性を高めるための一番良い方法は、常に 4 個の引き数で B<semctl>() を呼び出"
2308 #: build/C/man2/semctl.2:531
2310 "B<ipc>(2), B<semget>(2), B<semop>(2), B<capabilities>(7), B<sem_overview>"
2313 "B<ipc>(2), B<semget>(2), B<semop>(2), B<capabilities>(7), B<sem_overview>"
2317 #: build/C/man2/semget.2:36
2323 #: build/C/man2/semget.2:39
2324 msgid "semget - get a semaphore set identifier"
2325 msgstr "semget - セマフォ集合の識別子を取得する"
2328 #: build/C/man2/semget.2:49
2330 "B<int semget(key_t >I<key>B<,> B<int >I<nsems>B<,> B<int >I<semflg>B<);>"
2332 "B<int semget(key_t >I<key>B<,> B<int >I<nsems>B<,> B<int >I<semflg>B<);>"
2335 #: build/C/man2/semget.2:67
2337 "The B<semget>() system call returns the semaphore set identifier associated "
2338 "with the argument I<key>. A new set of I<nsems> semaphores is created if "
2339 "I<key> has the value B<IPC_PRIVATE> or if no existing semaphore set is "
2340 "associated with I<key> and B<IPC_CREAT> is specified in I<semflg>."
2342 "B<semget>() システムコールは、引き数 I<key> に対応するセマフォ集合 "
2343 "(semaphore set) の 識別子 (identifier) を返す。 I<key> の値が B<IPC_PRIVATE> "
2344 "の場合、もしくは I<semflg> に B<IPC_CREAT> が指定されていて、 I<key> に対応す"
2345 "るセマフォ集合が存在しない場合、 I<nsems> 個のセマフォからなる新しい集合が作"
2349 #: build/C/man2/semget.2:86
2351 "If I<semflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a semaphore set "
2352 "already exists for I<key>, then B<semget>() fails with I<errno> set to "
2353 "B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT | "
2354 "O_EXCL> for B<open>(2).)"
2356 "I<semflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
2357 "応するセマフォ集合が既に存在すると、 B<semget>() は失敗し、 I<errno> に "
2358 "B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | O_EXCL> が指定され"
2362 #: build/C/man2/semget.2:99
2364 "Upon creation, the least significant 9 bits of the argument I<semflg> define "
2365 "the permissions (for owner, group and others) for the semaphore set. These "
2366 "bits have the same format, and the same meaning, as the I<mode> argument of "
2367 "B<open>(2) (though the execute permissions are not meaningful for "
2368 "semaphores, and write permissions mean permission to alter semaphore values)."
2370 "セマフォ集合作成時に、引き数 I<semflg> の下位 9 ビットは、そのセマフォ集合の "
2371 "(所有者 (owner)、グループ (group)、 他人 (others) に対する) アクセス許可の定"
2372 "義として使用される。 これらのビットは B<open>(2) の引き数 I<mode> と同じ形式"
2373 "で同じ意味である (但し、実行 (execute) 許可はセマフォでは意味を持たず、 書き"
2374 "込み (write) 許可はセマフォ値の変更 (alter) 許可として機能する)。"
2376 #. In truth, every one of the many implementations that I've tested sets
2377 #. the values to zero, but I suppose there is/was some obscure
2378 #. implementation out there that does not.
2380 #: build/C/man2/semget.2:109
2382 "The values of the semaphores in a newly created set are indeterminate. "
2383 "(POSIX.1-2001 is explicit on this point.) Although Linux, like many other "
2384 "implementations, initializes the semaphore values to 0, a portable "
2385 "application cannot rely on this: it should explicitly initialize the "
2386 "semaphores to the desired values."
2388 "新しく作成されたセマフォ集合の各セマフォの値は不定である (この点は "
2389 "POSIX.1-2001 に明記されている)。 Linux は他の多くの実装と同様にセマフォ値を "
2390 "0 に初期化するが、 移植性を考慮したアプリケーションではこの動作を前提にすべき"
2391 "ではない。 アプリケーションは明示的にセマフォを希望の値で初期化すべきである。"
2394 #: build/C/man2/semget.2:117
2396 "When creating a new semaphore set, B<semget>() initializes the set's "
2397 "associated data structure, I<semid_ds> (see B<semctl>(2)), as follows:"
2399 "新規のセマフォ集合を作成する際、 B<semget>() はセマフォ集合の情報を保持する"
2400 "データ構造体 I<semid_ds> を次のように初期化する (I<semid_ds> については "
2401 "B<semctl>(2) を参照):"
2404 #: build/C/man2/semget.2:122
2406 "I<sem_perm.cuid> and I<sem_perm.uid> are set to the effective user ID of the "
2409 "I<sem_perm.cuid> と I<sem_perm.uid> に、呼び出し元のプロセスの実効 "
2410 "(effective) ユーザ ID を設定する。"
2413 #: build/C/man2/semget.2:127
2415 "I<sem_perm.cgid> and I<sem_perm.gid> are set to the effective group ID of "
2416 "the calling process."
2418 "I<sem_perm.cgid> と I<sem_perm.gid> に、呼び出し元のプロセスの実効 "
2419 "(effective) グループ ID を設定する。"
2422 #: build/C/man2/semget.2:132
2424 "The least significant 9 bits of I<sem_perm.mode> are set to the least "
2425 "significant 9 bits of I<semflg>."
2427 "I<sem_perm.mode> の下位 9 ビットに I<semflg> の下位 9 ビットを設定する。"
2430 #: build/C/man2/semget.2:136
2431 msgid "I<sem_nsems> is set to the value of I<nsems>."
2432 msgstr "I<sem_nsems> に I<nsems> の値を設定する。"
2435 #: build/C/man2/semget.2:139
2436 msgid "I<sem_otime> is set to 0."
2437 msgstr "I<sem_otime> に 0 を設定する。"
2440 #: build/C/man2/semget.2:142
2441 msgid "I<sem_ctime> is set to the current time."
2442 msgstr "I<sem_ctime> に現在の時刻を設定する。"
2445 #: build/C/man2/semget.2:153
2447 "The argument I<nsems> can be 0 (a don't care) when a semaphore set is not "
2448 "being created. Otherwise I<nsems> must be greater than 0 and less than or "
2449 "equal to the maximum number of semaphores per semaphore set (B<SEMMSL>)."
2451 "セマフォ集合の作成を行わない場合は、引き数 I<nsems> に (don't care を意味す"
2452 "る) 0 を指定してもよい。 そうでない場合は、 I<nsems> は 0 より大きい値でなけ"
2453 "ればならず、セマフォ集合あたりのセマフォの最大数 (B<SEMMSL>) 以下でなければ"
2456 #. and a check is made to see if it is marked for destruction.
2458 #: build/C/man2/semget.2:157
2459 msgid "If the semaphore set already exists, the permissions are verified."
2460 msgstr "セマフォ集合が既に存在した場合は、アクセス許可の検査が行われる。"
2463 #: build/C/man2/semget.2:163
2465 "If successful, the return value will be the semaphore set identifier (a "
2466 "nonnegative integer), otherwise -1 is returned, with I<errno> indicating the "
2469 "成功した場合、セマフォ集合の識別子 (非負の整数) が返り値となる。 失敗した場合"
2470 "は -1 が返され、 I<errno> にエラーを示す値が設定される。"
2473 #: build/C/man2/semget.2:167
2474 msgid "On failure I<errno> will be set to one of the following:"
2475 msgstr "失敗した場合、 I<errno> には以下の値のいずれか一つが設定される:"
2478 #: build/C/man2/semget.2:175
2480 "A semaphore set exists for I<key>, but the calling process does not have "
2481 "permission to access the set, and does not have the B<CAP_IPC_OWNER> "
2484 "I<key> に対応するセマフォ集合は存在するが、 呼び出し元のプロセスはその集合へ"
2485 "のアクセス許可がなく、 B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
2489 #. The semaphore set is marked to be deleted.
2491 #: build/C/man2/semget.2:188
2493 "A semaphore set exists for I<key> and I<semflg> specified both B<IPC_CREAT> "
2496 "I<key> に対応するセマフォ集合が存在し、 I<semflg> には B<IPC_CREAT> と "
2497 "B<IPC_EXCL> が指定されていた。"
2500 #: build/C/man2/semget.2:199
2502 "I<nsems> is less than 0 or greater than the limit on the number of "
2503 "semaphores per semaphore set (B<SEMMSL>), or a semaphore set corresponding "
2504 "to I<key> already exists, and I<nsems> is larger than the number of "
2505 "semaphores in that set."
2507 "I<nsems> が 0 より小さいか、セマフォ集合あたりのセマフォの最大数 "
2508 "(B<SEMMSL>) より大きい。 または、 I<key> に対応するセマフォ集合が既に存在"
2509 "し、 I<nsems> がその集合のセマフォ数よりも大きい。"
2512 #: build/C/man2/semget.2:207
2514 "No semaphore set exists for I<key> and I<semflg> did not specify "
2517 "I<key> に対応するセマフォ集合が存在せず、 I<semflg> に B<IPC_CREAT> が指定さ"
2521 #: build/C/man2/semget.2:211
2523 "A semaphore set has to be created but the system does not have enough memory "
2524 "for the new data structure."
2526 "セマフォ集合を作成しようとしたが、新しいデータ構造体を 作成するのに十分なメモ"
2530 #: build/C/man2/semget.2:211
2536 #: build/C/man2/semget.2:219
2538 "A semaphore set has to be created but the system limit for the maximum "
2539 "number of semaphore sets (B<SEMMNI>), or the system wide maximum number of "
2540 "semaphores (B<SEMMNS>), would be exceeded."
2542 "セマフォ集合を作成しようとすると、システムのセマフォ集合の 最大数 "
2543 "(B<SEMMNI>) か、システム全体のセマフォの最大数 (B<SEMMNS>) のいずれかを超え"
2547 #: build/C/man2/semget.2:246
2549 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
2550 "value is used for I<key>, the system call ignores everything but the least "
2551 "significant 9 bits of I<semflg> and creates a new semaphore set (on success)."
2553 "B<IPC_PRIVATE> はフラグ・フィールドに指定するものではなく、 I<key_t> 型であ"
2554 "る。 この特別な値が I<key> に指定されると、 B<semget>() I<semflg> の下位 9 "
2555 "ビット以外は全て無視し、 (成功した場合は) 新しいセマフォ集合を作成する。"
2558 #: build/C/man2/semget.2:250
2560 "The following limits on semaphore set resources affect the B<semget>() call:"
2562 "セマフォ集合のリソースに関する制限のうち、 B<semget>() に影響を及ぼすものを"
2566 #: build/C/man2/semget.2:250
2571 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
2573 #: build/C/man2/semget.2:256
2575 "System wide maximum number of semaphore sets: policy dependent (on Linux, "
2576 "this limit can be read and modified via the fourth field of I</proc/sys/"
2579 "システム全体のセマフォ集合の最大数: 方針依存 (Linux では、この制限値は I</"
2580 "proc/sys/kernel/sem> の第4フィールドに対応し、読み出しも変更もできる)。"
2583 #: build/C/man2/semget.2:256
2589 #: build/C/man2/semget.2:261
2591 "Maximum number of semaphores per semid: implementation dependent (on Linux, "
2592 "this limit can be read and modified via the first field of I</proc/sys/"
2595 "semid あたりのセマフォの最大数: 実装依存 (Linux では、この制限値は I</proc/"
2596 "sys/kernel/sem> の第1フィールドに対応し、読み出しも変更もできる)。"
2599 #: build/C/man2/semget.2:261
2605 #: build/C/man2/semget.2:269
2607 "System wide maximum number of semaphores: policy dependent (on Linux, this "
2608 "limit can be read and modified via the second field of I</proc/sys/kernel/"
2609 "sem>). Values greater than B<SEMMSL * SEMMNI> makes it irrelevant."
2611 "システム全体のセマフォの最大数: 方針依存 (Linux では、この制限値は I</proc/"
2612 "sys/kernel/sem> の第2フィールドに対応し、読み出しも変更もできる)。 B<SEMMSL "
2613 "* SEMMNI> より大きな値は意味を持たない。"
2616 #: build/C/man2/semget.2:269 build/C/man2/semop.2:476
2622 #: build/C/man2/semget.2:275
2624 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
2625 "more clearly show its function."
2627 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
2628 "より明確にその機能を表しているだろう。"
2630 #. In fact they are initialized to zero on Linux, but POSIX.1-2001
2631 #. does not specify this, and we can't portably rely on it.
2633 #: build/C/man2/semget.2:294
2635 "The semaphores in a set are not initialized by B<semget>(). In order to "
2636 "initialize the semaphores, B<semctl>(2) must be used to perform a B<SETVAL> "
2637 "or a B<SETALL> operation on the semaphore set. (Where multiple peers do not "
2638 "know who will be the first to initialize the set, checking for a nonzero "
2639 "I<sem_otime> in the associated data structure retrieved by a B<semctl>(2) "
2640 "B<IPC_STAT> operation can be used to avoid races.)"
2642 "セマフォ集合内のセマフォは B<semget>() では初期化されない。 このセマフォを初"
2643 "期化するには、セマフォ集合に対して B<semctl>(2) を使って B<SETVAL> か "
2644 "B<SETALL> 操作を実行する必要がある。 (複数箇所からセマフォ集合の操作が行われ"
2645 "る場面では、 誰が最初に集合を初期化すればよいか分からない。 この状況を避ける"
2646 "には、 B<semctl>(2) の B<IPC_STAT> 操作で取得できるセマフォのデータ構造体の "
2647 "I<sem_otime> が 0 以外になっているかをチェックすればよい。)"
2650 #: build/C/man2/semget.2:301
2652 "B<semctl>(2), B<semop>(2), B<ftok>(3), B<capabilities>(7), B<sem_overview>"
2655 "B<semctl>(2), B<semop>(2), B<ftok>(3), B<capabilities>(7), B<sem_overview>"
2659 #: build/C/man2/semop.2:35
2665 #: build/C/man2/semop.2:35
2667 #| msgid "2012-02-12"
2672 #: build/C/man2/semop.2:38
2673 msgid "semop, semtimedop - semaphore operations"
2674 msgstr "semop, semtimedop - セマフォの操作"
2677 #: build/C/man2/semop.2:45
2679 msgid "B<int semop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<);>\n"
2680 msgstr "B<int semop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<);>\n"
2683 #: build/C/man2/semop.2:48
2686 "B<int semtimedop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<,>\n"
2687 "B< struct timespec *>I<timeout>B<);>\n"
2689 "B<int semtimedop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<,>\n"
2690 "B< struct timespec *>I<timeout>B<);>\n"
2693 #: build/C/man2/semop.2:57
2694 msgid "B<semtimedop>(): _GNU_SOURCE"
2695 msgstr "B<semtimedop>(): _GNU_SOURCE"
2698 #: build/C/man2/semop.2:59
2699 msgid "Each semaphore in a semaphore set has the following associated values:"
2701 "セマフォ集合 (semaphore set) のメンバーの各セマフォは 以下の関連情報を持って"
2705 #: build/C/man2/semop.2:66
2708 #| "unsigned short semval; /* semaphore value */\n"
2709 #| "unsigned short semzcnt; /* # waiting for zero */\n"
2710 #| "unsigned short semncnt; /* # waiting for increase */\n"
2711 #| "pid_t sempid; /* process that did last op */\n"
2713 "unsigned short semval; /* semaphore value */\n"
2714 "unsigned short semzcnt; /* # waiting for zero */\n"
2715 "unsigned short semncnt; /* # waiting for increase */\n"
2716 "pid_t sempid; /* ID of process that did last op */\n"
2718 "unsigned short semval; /* セマフォ値 */\n"
2719 "unsigned short semzcnt; /* ゼロを待つプロセス数 */\n"
2720 "unsigned short semncnt; /* 増加を待つプロセス数 */\n"
2721 "pid_t sempid; /* 最後に操作を行なったプロセス */\n"
2724 #: build/C/man2/semop.2:80
2726 "B<semop>() performs operations on selected semaphores in the set indicated "
2727 "by I<semid>. Each of the I<nsops> elements in the array pointed to by "
2728 "I<sops> specifies an operation to be performed on a single semaphore. The "
2729 "elements of this structure are of type I<struct sembuf>, containing the "
2730 "following members:"
2732 "B<semop>() は I<semid> で指定されたセマフォ集合の選択されたセマフォに対して"
2733 "操作を行う。 I<sops> は I<nsops> 個の要素の配列を指し、配列の各要素は個々のセ"
2734 "マフォに 対する操作を示す。その型は I<struct sembuf> で、次のメンバを持つ:"
2737 #: build/C/man2/semop.2:86
2740 "unsigned short sem_num; /* semaphore number */\n"
2741 "short sem_op; /* semaphore operation */\n"
2742 "short sem_flg; /* operation flags */\n"
2744 "unsigned short sem_num; /* セマフォ番号 */\n"
2745 "short sem_op; /* セマフォ操作 */\n"
2746 "short sem_flg; /* 操作フラグ */\n"
2749 #: build/C/man2/semop.2:98
2751 "Flags recognized in I<sem_flg> are B<IPC_NOWAIT> and B<SEM_UNDO>. If an "
2752 "operation specifies B<SEM_UNDO>, it will be automatically undone when the "
2753 "process terminates."
2755 "I<sem_flg> には B<IPC_NOWAIT> と B<SEM_UNDO> が設定できる。 B<SEM_UNDO> が指"
2756 "定された操作は、そのプロセスが終了した時に自動的に取り消される。"
2759 #: build/C/man2/semop.2:113
2761 "The set of operations contained in I<sops> is performed in I<array order>, "
2762 "and I<atomically>, that is, the operations are performed either as a "
2763 "complete unit, or not at all. The behavior of the system call if not all "
2764 "operations can be performed immediately depends on the presence of the "
2765 "B<IPC_NOWAIT> flag in the individual I<sem_flg> fields, as noted below."
2767 "I<sops> に含まれる操作の集合は、 I<配列の順序> で、 I<アトミックに> 実行され"
2768 "る。 すなわち、全ての操作が完全に実行されるか、全く実行されないかの どちらか"
2769 "となる。 全ての操作が直ちに実行できない場合のこのシステムコールの振る舞いは "
2770 "個々の操作の I<sem_flg> フィールドに B<IPC_NOWAIT> が存在するかによって決ま"
2774 #: build/C/man2/semop.2:120
2776 "Each operation is performed on the I<sem_num>-th semaphore of the semaphore "
2777 "set, where the first semaphore of the set is numbered 0. There are three "
2778 "types of operation, distinguished by the value of I<sem_op>."
2780 "それぞれの操作はセマフォ集合の I<sem_num>番目 のセマフォに対して実行される。"
2781 "セマフォ集合の最初のセマフォには 番号 0 が振られる。 そして操作は三種類あ"
2782 "り、 I<sem_op> の値で区別される。"
2785 #: build/C/man2/semop.2:133
2788 #| "If I<sem_op> is a positive integer, the operation adds this value to the "
2789 #| "semaphore value (I<semval>). Furthermore, if B<SEM_UNDO> is specified "
2790 #| "for this operation, the system updates the process undo count "
2791 #| "(I<semadj>) for this semaphore. This operation can always proceed"
2792 #| "\\(emit never forces a process to wait. The calling process must have "
2793 #| "alter permission on the semaphore set."
2795 "If I<sem_op> is a positive integer, the operation adds this value to the "
2796 "semaphore value (I<semval>). Furthermore, if B<SEM_UNDO> is specified for "
2797 "this operation, the system updates the undo count (I<semadj>) for this "
2798 "semaphore. This operation can always proceed\\(emit never forces a thread "
2799 "to wait. The calling process must have alter permission on the semaphore "
2802 "I<sem_op> が正の整数の場合、操作としてその値をセマフォの値 (I<semval>) に加"
2803 "える。さらにこの操作に B<SEM_UNDO> が指定されている場合は、システムはこのセマ"
2804 "フォの プロセス・アンドゥ数 (I<semadj>) を更新する。 この操作は必ず実行で"
2805 "き、プロセスの停止は起こらない。 呼び出し元プロセスは対象のセマフォ集合を変更"
2809 #: build/C/man2/semop.2:158
2812 #| "If I<sem_op> is zero, the process must have read permission on the "
2813 #| "semaphore set. This is a \"wait-for-zero\" operation: if I<semval> is "
2814 #| "zero, the operation can immediately proceed. Otherwise, if B<IPC_NOWAIT> "
2815 #| "is specified in I<sem_flg>, B<semop>() fails with I<errno> set to "
2816 #| "B<EAGAIN> (and none of the operations in I<sops> is performed). "
2817 #| "Otherwise I<semzcnt> (the count of processes waiting until this "
2818 #| "semaphore's value becomes zero) is incremented by one and the process "
2819 #| "sleeps until one of the following occurs:"
2821 "If I<sem_op> is zero, the process must have read permission on the semaphore "
2822 "set. This is a \"wait-for-zero\" operation: if I<semval> is zero, the "
2823 "operation can immediately proceed. Otherwise, if B<IPC_NOWAIT> is specified "
2824 "in I<sem_flg>, B<semop>() fails with I<errno> set to B<EAGAIN> (and none of "
2825 "the operations in I<sops> is performed). Otherwise I<semzcnt> (the count of "
2826 "threads waiting until this semaphore's value becomes zero) is incremented "
2827 "by one and the thread sleeps until one of the following occurs:"
2829 "I<sem_op> が 0 の場合、「ゼロまで待つ」操作である。この場合、プロセスは その"
2830 "セマフォ集合に対する読み込み許可がなければならない。 I<semval> が 0 ならば、"
2831 "操作は直ちに行われる。 I<semval> が 0 でない場合、 I<sem_flg> に "
2832 "B<IPC_NOWAIT> が指定されていれば、 B<semop>() は失敗し、 B<errno> に "
2833 "B<EAGAIN> が設定される (このとき I<sops> に対する操作は全く実行されない)。 "
2834 "I<sem_flg> に B<IPC_NOWAIT> が指定されていない場合、 I<semzcnt> (セマフォ値"
2835 "が 0 になるのを待っているプロセスの数) を 1 増加させて、 以下のいずれかが起こ"
2836 "るまでプロセスを停止 (sleep) する。"
2839 #: build/C/man2/semop.2:158 build/C/man2/semop.2:163 build/C/man2/semop.2:171
2840 #: build/C/man2/semop.2:181 build/C/man2/semop.2:232 build/C/man2/semop.2:247
2841 #: build/C/man2/semop.2:254 build/C/man2/semop.2:264
2847 #: build/C/man2/semop.2:163
2849 "I<semval> becomes 0, at which time the value of I<semzcnt> is decremented."
2850 msgstr "I<semval> が 0 になった: このとき I<semzcnt> の値は 1 減算される。"
2853 #: build/C/man2/semop.2:171
2855 "The semaphore set is removed: B<semop>() fails, with I<errno> set to "
2858 "セマフォ集合が削除された: このとき B<semop>() は失敗し、 I<errno> に "
2862 #: build/C/man2/semop.2:181
2865 #| "The calling process catches a signal: the value of I<semzcnt> is "
2866 #| "decremented and B<semop>() fails, with I<errno> set to B<EINTR>."
2868 "The calling thread catches a signal: the value of I<semzcnt> is decremented "
2869 "and B<semop>() fails, with I<errno> set to B<EINTR>."
2871 "呼び出し元プロセスがシグナルを捕獲した: このとき I<semzcnt> の値は 1 減算さ"
2872 "れ、 B<semop>() は失敗し I<errno> に B<EINTR> が設定される。"
2875 #: build/C/man2/semop.2:192
2877 "The time limit specified by I<timeout> in a B<semtimedop>() call expires: "
2878 "B<semop>() fails, with I<errno> set to B<EAGAIN>."
2880 "B<semtimedop>() の I<timeout> で指定された制限時間が経過した: このとき "
2881 "B<semtimedop>() は失敗し、 I<errno> に B<EAGAIN> が設定される。"
2884 #: build/C/man2/semop.2:232
2887 #| "If I<sem_op> is less than zero, the process must have alter permission on "
2888 #| "the semaphore set. If I<semval> is greater than or equal to the absolute "
2889 #| "value of I<sem_op>, the operation can proceed immediately: the absolute "
2890 #| "value of I<sem_op> is subtracted from I<semval>, and, if B<SEM_UNDO> is "
2891 #| "specified for this operation, the system updates the process undo count "
2892 #| "(I<semadj>) for this semaphore. If the absolute value of I<sem_op> is "
2893 #| "greater than I<semval>, and B<IPC_NOWAIT> is specified in I<sem_flg>, "
2894 #| "B<semop>() fails, with I<errno> set to B<EAGAIN> (and none of the "
2895 #| "operations in I<sops> is performed). Otherwise I<semncnt> (the counter "
2896 #| "of processes waiting for this semaphore's value to increase) is "
2897 #| "incremented by one and the process sleeps until one of the following "
2900 "If I<sem_op> is less than zero, the process must have alter permission on "
2901 "the semaphore set. If I<semval> is greater than or equal to the absolute "
2902 "value of I<sem_op>, the operation can proceed immediately: the absolute "
2903 "value of I<sem_op> is subtracted from I<semval>, and, if B<SEM_UNDO> is "
2904 "specified for this operation, the system updates the undo count (I<semadj>) "
2905 "for this semaphore. If the absolute value of I<sem_op> is greater than "
2906 "I<semval>, and B<IPC_NOWAIT> is specified in I<sem_flg>, B<semop>() fails, "
2907 "with I<errno> set to B<EAGAIN> (and none of the operations in I<sops> is "
2908 "performed). Otherwise I<semncnt> (the counter of threads waiting for this "
2909 "semaphore's value to increase) is incremented by one and the thread sleeps "
2910 "until one of the following occurs:"
2912 "I<sem_op> が 0 未満の場合、プロセスにはそのセマフォ集合を変更する許可がなけれ"
2913 "ば ならない。 I<semval> が I<sem_op> の絶対値以上の場合は、操作は直ちに実行さ"
2914 "れる: I<semval> から I<sem_op> の絶対値が減算される。 さらに、この操作に "
2915 "B<SEM_UNDO> が指定されている場合は、このセマフォのプロセス・アンドゥ数 "
2916 "(I<semadj>) を更新する。 I<semval> が I<sem_op> の絶対値より小さく、 "
2917 "I<sem_flg> に B<IPC_NOWAIT> が指定された場合は、 B<semop>() は失敗し、 "
2918 "I<errno> に B<EAGAIN> が設定される (このとき I<sops> の操作は全く実行されな"
2919 "い)。 B<IPC_WAIT> が指定されていなければ、 I<semncnt> (このセマフォの値が増加"
2920 "するのを待っているプロセス数のカウンタ) を 1 増加させて、以下のいずれかが起"
2921 "こるまでプロセスを停止 (sleep) する。"
2924 #: build/C/man2/semop.2:247
2927 #| "I<semval> becomes greater than or equal to the absolute value of "
2928 #| "I<sem_op>, at which time the value of I<semncnt> is decremented, the "
2929 #| "absolute value of I<sem_op> is subtracted from I<semval> and, if "
2930 #| "B<SEM_UNDO> is specified for this operation, the system updates the "
2931 #| "process undo count (I<semadj>) for this semaphore."
2933 "I<semval> becomes greater than or equal to the absolute value of I<sem_op>, "
2934 "at which time the value of I<semncnt> is decremented, the absolute value of "
2935 "I<sem_op> is subtracted from I<semval> and, if B<SEM_UNDO> is specified for "
2936 "this operation, the system updates the undo count (I<semadj>) for this "
2939 "I<semval> が I<sem_op> の絶対値以上になった: このとき I<semncnt> が 1 減算さ"
2940 "れ、 I<semval> から I<sem_op> の絶対値が引かれる。 この操作に B<SEM_UNDO> が"
2941 "指定されていた場合にはこのセマフォのプロセス・アンドゥ数 (I<semadj>) も更新"
2945 #: build/C/man2/semop.2:254
2947 "The semaphore set is removed from the system: B<semop>() fails, with "
2948 "I<errno> set to B<EIDRM>."
2950 "セマフォ集合がシステムから削除された: このとき B<semop>() は失敗し I<errno> "
2951 "に B<EIDRM> が設定される。"
2954 #: build/C/man2/semop.2:264
2957 #| "The calling process catches a signal: the value of I<semncnt> is "
2958 #| "decremented and B<semop>() fails, with I<errno> set to B<EINTR>."
2960 "The calling thread catches a signal: the value of I<semncnt> is decremented "
2961 "and B<semop>() fails, with I<errno> set to B<EINTR>."
2963 "呼び出したプロセスがシグナルを捕獲した: このとき I<semncnt> が 1 減算され、 "
2964 "B<semop>() は失敗し I<errno> に B<EINTR> が設定される。"
2967 #: build/C/man2/semop.2:273
2969 "The time limit specified by I<timeout> in a B<semtimedop>() call expires: "
2970 "the system call fails, with I<errno> set to B<EAGAIN>."
2972 "B<semtimedop>() の I<timeout> で指定された制限時間が経過した: このとき "
2973 "B<semtimedop>() は失敗し、 I<errno> に B<EAGAIN> が設定される。"
2978 #: build/C/man2/semop.2:284
2981 #| "On successful completion, the I<sempid> value for each semaphore "
2982 #| "specified in the array pointed to by I<sops> is set to the process ID of "
2983 #| "the calling process. In addition, the I<sem_otime> is set to the current "
2986 "On successful completion, the I<sempid> value for each semaphore specified "
2987 "in the array pointed to by I<sops> is set to the caller's process ID. In "
2988 "addition, the I<sem_otime> is set to the current time."
2990 "操作が成功した場合、 I<sops> が指す配列によって操作対象となった各セマフォの "
2991 "I<sempid> メンバーには呼び出したプロセスのプロセス ID が設定される。 さらに "
2992 "I<sem_otime> に現在時刻が設定される。"
2995 #: build/C/man2/semop.2:314
2998 #| "B<semtimedop>() behaves identically to B<semop>() except that in those "
2999 #| "cases were the calling process would sleep, the duration of that sleep is "
3000 #| "limited by the amount of elapsed time specified by the I<timespec> "
3001 #| "structure whose address is passed in the I<timeout> argument. (This "
3002 #| "sleep interval will be rounded up to the system clock granularity, and "
3003 #| "kernel scheduling delays mean that the interval may overrun by a small "
3004 #| "amount.) If the specified time limit has been reached, B<semtimedop>() "
3005 #| "fails with I<errno> set to B<EAGAIN> (and none of the operations in "
3006 #| "I<sops> is performed). If the I<timeout> argument is NULL, then "
3007 #| "B<semtimedop>() behaves exactly like B<semop>()."
3009 "B<semtimedop>() behaves identically to B<semop>() except that in those "
3010 "cases where the calling thread would sleep, the duration of that sleep is "
3011 "limited by the amount of elapsed time specified by the I<timespec> structure "
3012 "whose address is passed in the I<timeout> argument. (This sleep interval "
3013 "will be rounded up to the system clock granularity, and kernel scheduling "
3014 "delays mean that the interval may overrun by a small amount.) If the "
3015 "specified time limit has been reached, B<semtimedop>() fails with I<errno> "
3016 "set to B<EAGAIN> (and none of the operations in I<sops> is performed). If "
3017 "the I<timeout> argument is NULL, then B<semtimedop>() behaves exactly like "
3020 "B<semtimedop>() 関数の振る舞いは B<semop>() と全く同じだが、呼び出し元\n"
3021 "プロセスが停止する場合、停止期間の上限が I<timeout> 引き数の指す\n"
3022 "I<timespec> 構造体で指定された時間となる点だけが異なる (この停止期間は\n"
3023 "システムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延に\n"
3024 "より、この停止期間は少しだけ長くなる可能性がある)。\n"
3025 "指定した制限時間に達した場合は、 B<semtimedop>() は失敗し、 I<errno> に\n"
3026 "B<EAGAIN> が設定される (このとき I<sops> の操作は実行されない)。\n"
3027 "I<timeout> 引き数が NULL の場合、 B<semtimedop>() 関数の振る舞いは\n"
3028 "B<semop>() 関数と全く同じになる。"
3031 #: build/C/man2/semop.2:324
3033 "If successful B<semop>() and B<semtimedop>() return 0; otherwise they "
3034 "return -1 with I<errno> indicating the error."
3036 "成功した場合、 B<semop>() と B<semtimedop>() は 0 を返す。そうでなければ "
3037 "-1 を返し、 エラーを示す I<errno> を設定する。"
3040 #: build/C/man2/semop.2:328
3041 msgid "On failure, I<errno> is set to one of the following:"
3042 msgstr "失敗した場合、 I<errno> に以下のどれかが設定される:"
3045 #: build/C/man2/semop.2:328
3051 #: build/C/man2/semop.2:336
3053 "The argument I<nsops> is greater than B<SEMOPM>, the maximum number of "
3054 "operations allowed per system call."
3056 "I<nsops> 引き数が B<SEMOPM> より大きい。 B<SEMOPM> は一回のシステムコールで許"
3060 #: build/C/man2/semop.2:343
3062 "The calling process does not have the permissions required to perform the "
3063 "specified semaphore operations, and does not have the B<CAP_IPC_OWNER> "
3066 "呼び出し元プロセスには指定されたセマフォ操作を行うのに 必要なアクセス許可がな"
3067 "く、 B<CAP_IPC_OWNER> ケーパビリティもない。"
3070 #: build/C/man2/semop.2:352
3072 "An operation could not proceed immediately and either B<IPC_NOWAIT> was "
3073 "specified in I<sem_flg> or the time limit specified in I<timeout> expired."
3075 "操作を直ちに処理することができず、かつ I<sem_flg> に B<IPC_NOWAIT> が指定され"
3076 "ているか I<timeout> で指定された制限時間が経過した。"
3079 #: build/C/man2/semop.2:359
3081 "An address specified in either the I<sops> or the I<timeout> argument isn't "
3083 msgstr "引き数 I<sops> か I<timeout> が指しているアドレスにアクセスできない。"
3086 #: build/C/man2/semop.2:359
3092 #: build/C/man2/semop.2:365
3094 "For some operation the value of I<sem_num> is less than 0 or greater than or "
3095 "equal to the number of semaphores in the set."
3097 "ある操作で、 I<sem_num> の値が 0 未満か、集合内のセマフォの数以上である。"
3100 #: build/C/man2/semop.2:372
3103 #| "While blocked in this system call, the process caught a signal; see "
3106 "While blocked in this system call, the thread caught a signal; see B<signal>"
3109 "このシステムコールで停止している時にプロセスがシグナルを捕獲した。 B<single>"
3113 #: build/C/man2/semop.2:379
3115 "The semaphore set doesn't exist, or I<semid> is less than zero, or I<nsops> "
3116 "has a nonpositive value."
3118 "セマフォ集合が存在しないか、 I<semid> が 0 未満であるか、 I<nsops> が正の数で"
3122 #: build/C/man2/semop.2:387
3124 "The I<sem_flg> of some operation specified B<SEM_UNDO> and the system does "
3125 "not have enough memory to allocate the undo structure."
3127 "ある操作で I<sem_flg> に B<SEM_UNDO> が指定されたが、システムにアンドゥ構造体"
3131 #: build/C/man2/semop.2:395
3133 "For some operation I<sem_op+semval> is greater than B<SEMVMX>, the "
3134 "implementation dependent maximum value for I<semval>."
3136 "ある操作で I<sem_op+semval> が B<SEMVMX> より大きい。 B<SEMVMX> は I<semval> "
3137 "の最大値で、その値は実装依存である。"
3140 #: build/C/man2/semop.2:395
3146 #: build/C/man2/semop.2:402
3148 "B<semtimedop>() first appeared in Linux 2.5.52, and was subsequently "
3149 "backported into kernel 2.4.22. Glibc support for B<semtimedop>() first "
3150 "appeared in version 2.3.3."
3152 "B<semtimedop>() は Linux 2.5.52 で初めて登場し、 それからカーネル 2.4.22 に"
3153 "も移植された。 B<semtimedop>() の glibc でのサポートはバージョン 2.3.3 で初"
3157 #: build/C/man2/semop.2:426
3159 "The I<sem_undo> structures of a process aren't inherited by the child "
3160 "produced by B<fork>(2), but they are inherited across an B<execve>(2) "
3163 "あるプロセスの I<sem_undo> 構造体は B<fork>(2) で生成された子プロセスには継"
3164 "承されないが、 B<execve>(2) システムコールの場合は継承される。"
3167 #: build/C/man2/semop.2:432
3169 "B<semop>() is never automatically restarted after being interrupted by a "
3170 "signal handler, regardless of the setting of the B<SA_RESTART> flag when "
3171 "establishing a signal handler."
3173 "B<semop>() はシグナルハンドラによって中断された後に、 決して自動的に再開する"
3174 "ことはない。 たとえシグナルハンドラの設定時に B<SA_RESTART> フラグがセットさ"
3178 #: build/C/man2/semop.2:447
3180 "I<semadj> is a per-process integer which is simply the (negative) count of "
3181 "all semaphore operations performed specifying the B<SEM_UNDO> flag. When a "
3182 "semaphore's value is directly set using the B<SETVAL> or B<SETALL> request "
3183 "to B<semctl>(2), the corresponding I<semadj> values in all processes are "
3186 "I<semadj> はプロセスごとの整数で、 B<SEM_UNDO> フラグを設定して実行された全て"
3187 "のセマフォ操作の(負数の)カウンタである。 B<semctl>(2) に B<SETVAL> または "
3188 "B<SETALL> を指定し、セマフォの値が 直接設定された場合には、全てのプロセスにお"
3189 "いて対応する I<semadj> の値がクリアされる。"
3192 #: build/C/man2/semop.2:452
3194 "The I<semval>, I<sempid>, I<semzcnt>, and I<semnct> values for a semaphore "
3195 "can all be retrieved using appropriate B<semctl>(2) calls."
3197 "あるセマフォの I<semval>, I<sempid>, I<semzcnt>, I<semnct> の値はいずれも、適"
3198 "切な操作を指定して B<semctl>(2) を呼び出すことで取得できる。"
3201 #: build/C/man2/semop.2:456
3203 "The following limits on semaphore set resources affect the B<semop>() call:"
3205 "セマフォ集合のリソースに関する制限のうち、 B<semop>() に影響を及ぼすものを以"
3209 #: build/C/man2/semop.2:456
3214 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
3216 #: build/C/man2/semop.2:464
3218 "Maximum number of operations allowed for one B<semop>() call (32) (on "
3219 "Linux, this limit can be read and modified via the third field of I</proc/"
3222 "一回の B<semop>() で許される操作の最大数 (32)。 (Linux では、この制限値は "
3223 "I</proc/sys/kernel/sem> の第3フィールドに対応し、読み出しも変更もできる)。"
3226 #: build/C/man2/semop.2:469
3228 "Maximum allowable value for I<semval>: implementation dependent (32767)."
3229 msgstr "I<semval> が取り得る最大値: 実装依存 (32767)。"
3232 #: build/C/man2/semop.2:476
3234 "The implementation has no intrinsic limits for the adjust on exit maximum "
3235 "value (B<SEMAEM>), the system wide maximum number of undo structures "
3236 "(B<SEMMNU>) and the per-process maximum number of undo entries system "
3239 "以下の値に関しては実装依存の制限はない。 終了時の調整 (adjust on exit) の最大"
3240 "値 (B<SEMAEM>)、 システム全体のアンドゥ構造体の最大数 (B<SEMMNU>)、 プロセス"
3244 #: build/C/man2/semop.2:497
3246 "When a process terminates, its set of associated I<semadj> structures is "
3247 "used to undo the effect of all of the semaphore operations it performed with "
3248 "the B<SEM_UNDO> flag. This raises a difficulty: if one (or more) of these "
3249 "semaphore adjustments would result in an attempt to decrease a semaphore's "
3250 "value below zero, what should an implementation do? One possible approach "
3251 "would be to block until all the semaphore adjustments could be performed. "
3252 "This is however undesirable since it could force process termination to "
3253 "block for arbitrarily long periods. Another possibility is that such "
3254 "semaphore adjustments could be ignored altogether (somewhat analogously to "
3255 "failing when B<IPC_NOWAIT> is specified for a semaphore operation). Linux "
3256 "adopts a third approach: decreasing the semaphore value as far as possible "
3257 "(i.e., to zero) and allowing process termination to proceed immediately."
3259 "プロセスが終了する際、プロセスに対応する I<semadj> の集合を使って、 "
3260 "B<SEM_UNDO> フラグ付きで実行された全てのセマフォ操作の影響を取り消す。 これに"
3261 "よりある問題が発生する: これらのセマフォの調整を行っていると、 中にはセマフォ"
3262 "の値が 0 未満の値にしようとする場合が出てくる。 このような場合、どのように実"
3263 "装するべきか? ひとつの考えられる手法は、全てのセマフォ調整が実行されるまで 停"
3264 "止することである。しかし、この方法ではプロセスの終了が 長時間にわたって停止さ"
3265 "れることがあるので望ましくない。 しかもどれくらい長時間になるかは分からな"
3266 "い。 別の選択肢として、このようなセマフォ調整を完全に無視してしまう方法があ"
3267 "る (これはセマフォ操作として B<IPC_NOWAIT> が指定するのと少し似ている)。 "
3268 "Linux は第三の手法を採用している: セマフォの値を出来るだけ (つまり 0 まで) 減"
3269 "少させて、プロセスの終了を直ちに続行できるようにしている。"
3272 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=110260821123863&w=2
3274 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=110261701025794&w=2
3276 #: build/C/man2/semop.2:506
3279 #| "In kernels 2.6.x, x E<lt>= 10, there is a bug that in some circumstances "
3280 #| "prevents a process that is waiting for a semaphore value to become zero "
3281 #| "from being woken up when the value does actually become zero. This bug "
3282 #| "is fixed in kernel 2.6.11."
3284 "In kernels 2.6.x, x E<lt>= 10, there is a bug that in some circumstances "
3285 "prevents a thread that is waiting for a semaphore value to become zero from "
3286 "being woken up when the value does actually become zero. This bug is fixed "
3289 "カーネル 2.6.x (x E<lt>= 10) には、ある状況においてセマフォ値が 0 になるのを "
3290 "待っているプロセスが、セマフォ値が実際に 0 になったときに起床 (wake up) され"
3291 "ない、というバグがある。このバグはカーネル 2.6.11 で修正されている。"
3294 #: build/C/man2/semop.2:511
3296 "The following code segment uses B<semop>() to atomically wait for the value "
3297 "of semaphore 0 to become zero, and then increment the semaphore value by one."
3299 "以下の部分的なコードは、 セマフォ 0 の値が 0 になるのを待ってから、 セマフォ"
3300 "の値を 1 加算する処理を、 B<semop>() を使ってアトミック (atomically) に行"
3304 #: build/C/man2/semop.2:515
3307 " struct sembuf sops[2];\n"
3310 " struct sembuf sops[2];\n"
3314 #: build/C/man2/semop.2:517
3316 msgid " /* Code to set I<semid> omitted */\n"
3317 msgstr " /* Code to set I<semid> omitted */\n"
3320 #: build/C/man2/semop.2:521
3323 " sops[0].sem_num = 0; /* Operate on semaphore 0 */\n"
3324 " sops[0].sem_op = 0; /* Wait for value to equal 0 */\n"
3325 " sops[0].sem_flg = 0;\n"
3327 " sops[0].sem_num = 0; /* Operate on semaphore 0 */\n"
3328 " sops[0].sem_op = 0; /* Wait for value to equal 0 */\n"
3329 " sops[0].sem_flg = 0;\n"
3332 #: build/C/man2/semop.2:525
3335 " sops[1].sem_num = 0; /* Operate on semaphore 0 */\n"
3336 " sops[1].sem_op = 1; /* Increment value by one */\n"
3337 " sops[1].sem_flg = 0;\n"
3339 " sops[1].sem_num = 0; /* Operate on semaphore 0 */\n"
3340 " sops[1].sem_op = 1; /* Increment value by one */\n"
3341 " sops[1].sem_flg = 0;\n"
3344 #: build/C/man2/semop.2:530
3347 " if (semop(semid, sops, 2) == -1) {\n"
3348 " perror(\"semop\");\n"
3349 " exit(EXIT_FAILURE);\n"
3352 " if (semop(semid, sops, 2) == -1) {\n"
3353 " perror(\"semop\");\n"
3354 " exit(EXIT_FAILURE);\n"
3358 #: build/C/man2/semop.2:540
3361 #| "B<semctl>(2), B<semget>(2), B<sigaction>(2), B<capabilities>(7), "
3362 #| "B<sem_overview>(7), B<svipc>(7), B<time>(7)"
3364 "B<clone>(2), B<semctl>(2), B<semget>(2), B<sigaction>(2), B<capabilities>"
3365 "(7), B<sem_overview>(7), B<svipc>(7), B<time>(7)"
3367 "B<semctl>(2), B<semget>(2), B<sigaction>(2), B<capabilities>(7), "
3368 "B<sem_overview>(7), B<svipc>(7), B<time>(7)"
3370 #~ msgid "2006-03-25"
3371 #~ msgstr "2006-03-25"
3373 #~ msgid "2008-07-27"
3374 #~ msgstr "2008-07-27"
3376 #~ msgid "2009-02-20"
3377 #~ msgstr "2009-02-20"
3379 #~ msgid "2010-05-22"
3380 #~ msgstr "2010-05-22"
3382 #~ msgid "2009-03-30"
3383 #~ msgstr "2009-03-30"
3385 #~ msgid "2009-09-27"
3386 #~ msgstr "2009-09-27"
3388 #~ msgid "2004-05-27"
3389 #~ msgstr "2004-05-27"
3391 #~ msgid "2008-10-04"
3392 #~ msgstr "2008-10-04"