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: 2012-04-25 05:36+0900\n"
10 "PO-Revision-Date: 2012-04-24 14:02+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_unlink.3:26
32 #: build/C/man3/sem_close.3:26 build/C/man3/sem_destroy.3:26
33 #: build/C/man3/sem_getvalue.3:26 build/C/man3/sem_init.3:26
34 #: build/C/man3/sem_open.3:26 build/C/man7/sem_overview.7:26
35 #: build/C/man3/sem_post.3:26 build/C/man3/sem_unlink.3:26
36 #: build/C/man3/sem_wait.3:26 build/C/man2/semctl.2:39
37 #: build/C/man2/semget.2:34 build/C/man2/semop.2:33
43 #: build/C/man3/sem_close.3:26 build/C/man3/sem_destroy.3:26
44 #: build/C/man3/sem_getvalue.3:26 build/C/man3/sem_init.3:26
45 #: build/C/man3/sem_open.3:26 build/C/man7/sem_overview.7:26
46 #: build/C/man3/sem_post.3:26 build/C/man3/sem_unlink.3:26
47 #: build/C/man3/sem_wait.3:26 build/C/man2/semctl.2:39
48 #: build/C/man2/semget.2:34 build/C/man2/semop.2:33
50 msgid "Linux Programmer's Manual"
51 msgstr "Linux Programmer's Manual"
54 #: build/C/man3/sem_close.3:27 build/C/man3/sem_destroy.3:27
55 #: build/C/man3/sem_getvalue.3:27 build/C/man3/sem_init.3:27
56 #: build/C/man3/sem_open.3:27 build/C/man7/sem_overview.7:27
57 #: build/C/man3/sem_post.3:27 build/C/man3/sem_unlink.3:27
58 #: build/C/man3/sem_wait.3:27 build/C/man2/semctl.2:40
59 #: build/C/man2/semget.2:35 build/C/man2/semop.2:34
65 #: build/C/man3/sem_close.3:29
66 msgid "sem_close - close a named semaphore"
67 msgstr "sem_close - 名前付きセマフォをクローズする"
70 #: build/C/man3/sem_close.3:29 build/C/man3/sem_destroy.3:29
71 #: build/C/man3/sem_getvalue.3:29 build/C/man3/sem_init.3:29
72 #: build/C/man3/sem_open.3:29 build/C/man3/sem_post.3:29
73 #: build/C/man3/sem_unlink.3:29 build/C/man3/sem_wait.3:29
74 #: build/C/man2/semctl.2:42 build/C/man2/semget.2:37 build/C/man2/semop.2:36
80 #: build/C/man3/sem_close.3:32 build/C/man3/sem_destroy.3:32
81 #: build/C/man3/sem_getvalue.3:32 build/C/man3/sem_init.3:32
82 #: build/C/man3/sem_post.3:32 build/C/man3/sem_unlink.3:32
83 #: build/C/man3/sem_wait.3:32
85 msgid "B<#include E<lt>semaphore.hE<gt>>\n"
86 msgstr "B<#include E<lt>semaphore.hE<gt>>\n"
89 #: build/C/man3/sem_close.3:34
91 msgid "B<int sem_close(sem_t *>I<sem>B<);>\n"
92 msgstr "B<int sem_close(sem_t *>I<sem>B<);>\n"
95 #: build/C/man3/sem_close.3:37 build/C/man3/sem_destroy.3:37
96 #: build/C/man3/sem_getvalue.3:37 build/C/man3/sem_init.3:37
97 #: build/C/man3/sem_open.3:41 build/C/man3/sem_post.3:37
98 #: build/C/man3/sem_unlink.3:37 build/C/man3/sem_wait.3:41
99 msgid "Link with I<-lrt> or I<-pthread>."
100 msgstr "I<-lrt> または I<-pthread> でリンクする。"
103 #: build/C/man3/sem_close.3:37 build/C/man3/sem_destroy.3:37
104 #: build/C/man3/sem_getvalue.3:37 build/C/man3/sem_init.3:37
105 #: build/C/man3/sem_open.3:41 build/C/man7/sem_overview.7:29
106 #: build/C/man3/sem_post.3:37 build/C/man3/sem_unlink.3:37
107 #: build/C/man3/sem_wait.3:49 build/C/man2/semctl.2:50
108 #: build/C/man2/semget.2:47 build/C/man2/semop.2:55
114 #: build/C/man3/sem_close.3:43
116 "B<sem_close>() closes the named semaphore referred to by I<sem>, allowing "
117 "any resources that the system has allocated to the calling process for this "
118 "semaphore to be freed."
120 "B<sem_close>() は I<sem> が参照する名前付きセマフォをクローズし、 このセマ"
121 "フォ用に呼び出し元プロセスにシステムが割り当てていた リソースを解放できるよう"
125 #: build/C/man3/sem_close.3:43 build/C/man3/sem_destroy.3:55
126 #: build/C/man3/sem_getvalue.3:54 build/C/man3/sem_init.3:77
127 #: build/C/man3/sem_open.3:104 build/C/man3/sem_post.3:45
128 #: build/C/man3/sem_unlink.3:44 build/C/man3/sem_wait.3:108
129 #: build/C/man2/semctl.2:338 build/C/man2/semget.2:155
130 #: build/C/man2/semop.2:309
136 #: build/C/man3/sem_close.3:49
138 "On success B<sem_close>() returns 0; on error, -1 is returned, with "
139 "I<errno> set to indicate the error."
141 "成功すると、 B<sem_close>() は 0 を返す。エラーの場合、-1 を返し、 I<errno> "
145 #: build/C/man3/sem_close.3:49 build/C/man3/sem_destroy.3:61
146 #: build/C/man3/sem_getvalue.3:60 build/C/man3/sem_init.3:83
147 #: build/C/man3/sem_open.3:116 build/C/man3/sem_post.3:52
148 #: build/C/man3/sem_unlink.3:50 build/C/man3/sem_wait.3:114
149 #: build/C/man2/semctl.2:385 build/C/man2/semget.2:161
150 #: build/C/man2/semop.2:319
156 #: build/C/man3/sem_close.3:50 build/C/man3/sem_destroy.3:62
157 #: build/C/man3/sem_getvalue.3:61 build/C/man3/sem_init.3:84
158 #: build/C/man3/sem_open.3:132 build/C/man3/sem_open.3:137
159 #: build/C/man3/sem_post.3:53 build/C/man3/sem_wait.3:119
160 #: build/C/man3/sem_wait.3:133 build/C/man2/semctl.2:418
161 #: build/C/man2/semget.2:186 build/C/man2/semop.2:367
167 #: build/C/man3/sem_close.3:54 build/C/man3/sem_destroy.3:66
168 #: build/C/man3/sem_getvalue.3:65 build/C/man3/sem_post.3:57
169 #: build/C/man3/sem_wait.3:123
170 msgid "I<sem> is not a valid semaphore."
171 msgstr "I<sem> は有効なセマフォではない。"
174 #: build/C/man3/sem_close.3:54 build/C/man3/sem_destroy.3:66
175 #: build/C/man3/sem_getvalue.3:65 build/C/man3/sem_init.3:95
176 #: build/C/man3/sem_open.3:170 build/C/man7/sem_overview.7:138
177 #: build/C/man3/sem_post.3:61 build/C/man3/sem_unlink.3:62
178 #: build/C/man3/sem_wait.3:143 build/C/man2/semctl.2:460
179 #: build/C/man2/semget.2:217 build/C/man2/semop.2:397
181 msgid "CONFORMING TO"
185 #: build/C/man3/sem_close.3:56 build/C/man3/sem_destroy.3:68
186 #: build/C/man3/sem_getvalue.3:67 build/C/man3/sem_init.3:97
187 #: build/C/man3/sem_open.3:172 build/C/man7/sem_overview.7:140
188 #: build/C/man3/sem_post.3:63 build/C/man3/sem_unlink.3:64
189 #: build/C/man3/sem_wait.3:145
190 msgid "POSIX.1-2001."
191 msgstr "POSIX.1-2001."
194 #: build/C/man3/sem_close.3:56 build/C/man3/sem_destroy.3:68
195 #: build/C/man3/sem_getvalue.3:67 build/C/man3/sem_init.3:97
196 #: build/C/man7/sem_overview.7:140 build/C/man3/sem_post.3:63
197 #: build/C/man3/sem_wait.3:145 build/C/man2/semctl.2:463
198 #: build/C/man2/semget.2:221 build/C/man2/semop.2:400
204 #: build/C/man3/sem_close.3:60
206 "All open named semaphores are automatically closed on process termination, "
207 "or upon B<execve>(2)."
209 "オープンされたすべての名前付きセマフォは、プロセス終了時、もしくは B<execve>"
210 "(2) 実行時に自動的にクローズされる。"
213 #: build/C/man3/sem_close.3:60 build/C/man3/sem_destroy.3:74
214 #: build/C/man3/sem_getvalue.3:71 build/C/man3/sem_init.3:102
215 #: build/C/man3/sem_open.3:172 build/C/man7/sem_overview.7:152
216 #: build/C/man3/sem_post.3:70 build/C/man3/sem_unlink.3:64
217 #: build/C/man3/sem_wait.3:262 build/C/man2/semctl.2:509
218 #: build/C/man2/semget.2:279 build/C/man2/semop.2:513
224 #: build/C/man3/sem_close.3:66
226 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), "
227 "B<sem_wait>(3), B<sem_overview>(7)"
229 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), "
230 "B<sem_wait>(3), B<sem_overview>(7)"
233 #: build/C/man3/sem_destroy.3:26
239 #: build/C/man3/sem_destroy.3:29
240 msgid "sem_destroy - destroy an unnamed semaphore"
241 msgstr "sem_destroy - 名前なしセマフォを破棄する"
244 #: build/C/man3/sem_destroy.3:34
246 msgid "B<int sem_destroy(sem_t *>I<sem>B<);>\n"
247 msgstr "B<int sem_destroy(sem_t *>I<sem>B<);>\n"
250 #: build/C/man3/sem_destroy.3:41
252 "B<sem_destroy>() destroys the unnamed semaphore at the address pointed to "
255 "B<sem_destroy>() は I<sem> が指すアドレスにある名前なしセマフォを破棄する。"
258 #: build/C/man3/sem_destroy.3:46
260 "Only a semaphore that has been initialized by B<sem_init>(3) should be "
261 "destroyed using B<sem_destroy>()."
263 "B<sem_destroy>() を使って破棄するのは、 B<sem_init>(3) で初期化したセマフォ"
267 #: build/C/man3/sem_destroy.3:51
269 "Destroying a semaphore that other processes or threads are currently blocked "
270 "on (in B<sem_wait>(3)) produces undefined behavior."
272 "他のプロセスやスレッドが (B<sem_wait>(3) で) 待ち状態になっているセマフォを"
273 "破棄した場合の挙動は定義されていない。"
276 #: build/C/man3/sem_destroy.3:55
278 "Using a semaphore that has been destroyed produces undefined results, until "
279 "the semaphore has been reinitialized using B<sem_init>(3)."
281 "すでに破棄されたセマフォを、 B<sem_init>(3) を使って再初期化される前に使用し"
285 #: build/C/man3/sem_destroy.3:61
287 "B<sem_destroy>() returns 0 on success; on error, -1 is returned, and "
288 "I<errno> is set to indicate the error."
290 "成功すると、 B<sem_destroy>() は 0 を返す。エラーの場合、-1 を返し、 "
291 "I<errno> にエラーを示す値をセットする。"
293 #. But not on NPTL, where sem_destroy () is a no-op..
295 #: build/C/man3/sem_destroy.3:74
297 "An unnamed semaphore should be destroyed with B<sem_destroy>() before the "
298 "memory in which it is located is deallocated. Failure to do this can result "
299 "in resource leaks on some implementations."
301 "名前なしセマフォは、そのセマフォが置かれているメモリが解放される前に、 "
302 "B<sem_destroy>() を使って破棄しておくべきである。これを行わなかった場合、実"
303 "装によっては リソースのリークが起こりえる。"
306 #: build/C/man3/sem_destroy.3:78
307 msgid "B<sem_init>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
308 msgstr "B<sem_init>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
311 #: build/C/man3/sem_getvalue.3:26
314 msgstr "SEM_GETVALUE"
317 #: build/C/man3/sem_getvalue.3:29
318 msgid "sem_getvalue - get the value of a semaphore"
319 msgstr "sem_getvalue - セマフォの値を取得する"
322 #: build/C/man3/sem_getvalue.3:34
324 msgid "B<int sem_getvalue(sem_t *>I<sem>B<, int *>I<sval>B<);>\n"
325 msgstr "B<int sem_getvalue(sem_t *>I<sem>B<, int *>I<sval>B<);>\n"
328 #: build/C/man3/sem_getvalue.3:43
330 "B<sem_getvalue>() places the current value of the semaphore pointed to "
331 "I<sem> into the integer pointed to by I<sval>."
333 "B<sem_getvalue>() は、 I<sem> が指すセマフォの現在の値を I<sval> で指す整数"
337 #: build/C/man3/sem_getvalue.3:54
339 "If one or more processes or threads are blocked waiting to lock the "
340 "semaphore with B<sem_wait>(3), POSIX.1-2001 permits two possibilities for "
341 "the value returned in I<sval>: either 0 is returned; or a negative number "
342 "whose absolute value is the count of the number of processes and threads "
343 "currently blocked in B<sem_wait>(3). Linux adopts the former behavior."
345 "POSIX.1-2001 によると、 1つ以上のプロセスかスレッドが B<sem_wait>(3) でセマ"
346 "フォのロック待ちで停止している場合、 I<sval> で返される値は 0 もしくは負の値"
347 "のいずれかとなる。 負の値の場合、その絶対値は B<sem_wait>(3) で現在停止して"
348 "いるプロセスかスレッドの合計数に等しい。 Linux は前者の動作 (0 を返す動作) を"
352 #: build/C/man3/sem_getvalue.3:60
354 "B<sem_getvalue>() returns 0 on success; on error, -1 is returned and "
355 "I<errno> is set to indicate the error."
357 "成功すると、 B<sem_getvalue>() は 0 を返す。エラーの場合、-1 を返し、 "
358 "I<errno> にエラーを示す値をセットする。"
361 #: build/C/man3/sem_getvalue.3:71
363 "The value of the semaphore may already have changed by the time "
364 "B<sem_getvalue>() returns."
366 "B<sem_getvalue>() が返るときには、すでにセマフォの値は変化している可能性があ"
370 #: build/C/man3/sem_getvalue.3:74
371 msgid "B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
372 msgstr "B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
375 #: build/C/man3/sem_init.3:26
381 #: build/C/man3/sem_init.3:26
387 #: build/C/man3/sem_init.3:29
388 msgid "sem_init - initialize an unnamed semaphore"
389 msgstr "sem_init - 名前なしセマフォを初期化する"
392 #: build/C/man3/sem_init.3:34
394 msgid "B<int sem_init(sem_t *>I<sem>B<, int >I<pshared>B<, unsigned int >I<value>B<);>\n"
395 msgstr "B<int sem_init(sem_t *>I<sem>B<, int >I<pshared>B<, unsigned int >I<value>B<);>\n"
398 #: build/C/man3/sem_init.3:44
400 "B<sem_init>() initializes the unnamed semaphore at the address pointed to "
401 "by I<sem>. The I<value> argument specifies the initial value for the "
404 "B<sem_init>() は、 I<sem> が指すアドレスにある名前なしセマフォを初期化す"
405 "る。 I<value> 引き数はそのセマフォの初期値を指定する。"
408 #: build/C/man3/sem_init.3:49
410 "The I<pshared> argument indicates whether this semaphore is to be shared "
411 "between the threads of a process, or between processes."
413 "I<pshared> 引き数は、このセマフォがプロセス内のスレッド間で共有されるのか、 "
417 #: build/C/man3/sem_init.3:57
419 "If I<pshared> has the value 0, then the semaphore is shared between the "
420 "threads of a process, and should be located at some address that is visible "
421 "to all threads (e.g., a global variable, or a variable allocated dynamically "
424 "I<pshared> が 0 の場合、セマフォはプロセス内のスレッド間で共有される。 セマ"
425 "フォはすべてのスレッドから参照可能なアドレスに配置すべきである (例えば、大域"
426 "変数や、ヒープ上に動的に割り当てられた変数など)。"
429 #: build/C/man3/sem_init.3:74
431 "If I<pshared> is nonzero, then the semaphore is shared between processes, "
432 "and should be located in a region of shared memory (see B<shm_open>(3), "
433 "B<mmap>(2), and B<shmget>(2)). (Since a child created by B<fork>(2) "
434 "inherits its parent's memory mappings, it can also access the semaphore.) "
435 "Any process that can access the shared memory region can operate on the "
436 "semaphore using B<sem_post>(3), B<sem_wait>(3), etc."
438 "I<pshared> が 0 以外の場合、セマフォはプロセス間で共有される。セマフォは 共有"
439 "メモリ領域に配置すべきである (B<shm_open>(3), B<mmap>(2), B<shmget>(2) 参"
440 "照)。 (B<fork>(2) で生成された子プロセスは親プロセスのメモリマッピングを継承"
441 "するため、 子プロセスもセマフォにアクセスできる。) 共有メモリ領域にアクセス"
442 "できるプロセスならば、どのプロセスでも B<sem_post>(3) や B<sem_wait>(3) な"
446 #: build/C/man3/sem_init.3:77
448 "Initializing a semaphore that has already been initialized results in "
449 "undefined behavior."
450 msgstr "すでに初期化済のセマフォを初期化した場合の挙動は定義されていない。"
453 #: build/C/man3/sem_init.3:83
455 "B<sem_init>() returns 0 on success; on error, -1 is returned, and I<errno> "
456 "is set to indicate the error."
458 "成功すると、 B<sem_init>() は 0 を返す。エラーの場合、-1 を返し、 I<errno> "
462 #: build/C/man3/sem_init.3:89
463 msgid "I<value> exceeds B<SEM_VALUE_MAX>."
464 msgstr "I<value> が B<SEM_VALUE_MAX> を超えている。"
467 #: build/C/man3/sem_init.3:89
473 #: build/C/man3/sem_init.3:95
475 "I<pshared> is nonzero, but the system does not support process-shared "
476 "semaphores (see B<sem_overview>(7))."
478 "I<pshared> が 0 以外だが、システムがプロセス共有セマフォをサポートしていない "
479 "(B<sem_overview>(7) 参照)。"
482 #: build/C/man3/sem_init.3:102
484 "Bizarrely, POSIX.1-2001 does not specify the value that should be returned "
485 "by a successful call to B<sem_init>(). POSIX.1-2008 rectifies this, "
486 "specifying the zero return on success."
488 "妙なことに、POSIX.1-2001 は B<sem_init>() が成功した場合に返すべき値を規定し"
489 "ていない。 POSIX.1-2008 ではこれが修正され、成功時には 0 を返すことが規定され"
493 #: build/C/man3/sem_init.3:106
494 msgid "B<sem_destroy>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
495 msgstr "B<sem_destroy>(3), B<sem_post>(3), B<sem_wait>(3), B<sem_overview>(7)"
498 #: build/C/man3/sem_open.3:26
504 #: build/C/man3/sem_open.3:26
510 #: build/C/man3/sem_open.3:29
511 msgid "sem_open - initialize and open a named semaphore"
512 msgstr "sem_open - 名前付きセマフォを初期化し、オープンする"
515 #: build/C/man3/sem_open.3:34
518 "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n"
519 "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n"
520 "B<#include E<lt>semaphore.hE<gt>>\n"
522 "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n"
523 "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n"
524 "B<#include E<lt>semaphore.hE<gt>>\n"
527 #: build/C/man3/sem_open.3:38
530 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
531 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<, >\n"
532 "B< mode_t >I<mode>B<, unsigned int >I<value>B<);>\n"
534 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
535 "B<sem_t *sem_open(const char *>I<name>B<, int >I<oflag>B<, >\n"
536 "B< mode_t >I<mode>B<, unsigned int >I<value>B<);>\n"
539 #: build/C/man3/sem_open.3:50
541 "B<sem_open>() creates a new POSIX semaphore or opens an existing "
542 "semaphore. The semaphore is identified by I<name>. For details of the "
543 "construction of I<name>, see B<sem_overview>(7)."
545 "B<sem_open>() は、新規の POSIX セマフォを作成するか、既存のセマフォのオープ"
546 "ンを行う。 セマフォは I<name> で識別される。 I<name> の構成の詳細は "
547 "B<sem_overview>(7) を参照。"
549 #. In reality the file system IDs are used on Linux.
551 #: build/C/man3/sem_open.3:76
553 "The I<oflag> argument specifies flags that control the operation of the "
554 "call. (Definitions of the flags values can be obtained by including "
555 "I<E<lt>fcntl.hE<gt>>.) If B<O_CREAT> is specified in I<oflag>, then the "
556 "semaphore is created if it does not already exist. The owner (user ID) of "
557 "the semaphore is set to the effective user ID of the calling process. The "
558 "group ownership (group ID) is set to the effective group ID of the calling "
559 "process. If both B<O_CREAT> and B<O_EXCL> are specified in I<oflag>, then "
560 "an error is returned if a semaphore with the given I<name> already exists."
562 "I<oflag> 引き数には、 B<sem_open>() の動作を制御するフラグを指定する (oflag "
563 "の値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる)。 I<oflag> "
564 "に B<O_CREAT> が指定されると、まだ存在しない場合にはそのセマフォが作成され"
565 "る。 セマフォの所有者 (ユーザ ID)、グループ所有権 (グループ ID) には、 それぞ"
566 "れ呼び出し元プロセスの実効 UID、実効 GID が設定される。 I<oflag> に "
567 "B<O_CREAT> と B<O_EXCL> の両方が指定された場合、指定された名前 I<name> のセマ"
568 "フォがすでに存在するとエラーが返される。"
571 #: build/C/man3/sem_open.3:104
573 "If B<O_CREAT> is specified in I<oflag>, then two additional arguments must "
574 "be supplied. The I<mode> argument specifies the permissions to be placed on "
575 "the new semaphore, as for B<open>(2). (Symbolic definitions for the "
576 "permissions bits can be obtained by including I<E<lt>sys/stat.hE<gt>>.) The "
577 "permissions settings are masked against the process umask. Both read and "
578 "write permission should be granted to each class of user that will access "
579 "the semaphore. The I<value> argument specifies the initial value for the "
580 "new semaphore. If B<O_CREAT> is specified, and a semaphore with the given "
581 "I<name> already exists, then I<mode> and I<value> are ignored."
583 "I<oflag> に B<O_CREAT> を指定する場合、さらに引き数が 2 つ必要である。 "
584 "I<mode> 引き数は、 B<open>(2) と同じように、新しいセマフォに設定されるアクセ"
585 "ス許可 (permission) を 指定する。許可設定はプロセスの umask でマスクされる "
586 "(許可ビットのシンボル定義は I<E<lt>sys/stat.hE<gt>> のインクルードにより得ら"
587 "れる)。 セマフォにアクセスしようとするユーザは、読み出し許可と書き込み許可の "
588 "両方を得る必要がある。 I<value> 引き数は新しいセマフォの初期値を指定する。 "
589 "B<O_CREAT> が指定され、指定した名前 I<name> のセマフォがすでに存在する場合、 "
590 "I<mode> と I<value> は無視される。"
593 #: build/C/man3/sem_open.3:116
595 "On success, B<sem_open>() returns the address of the new semaphore; this "
596 "address is used when calling other semaphore-related functions. On error, "
597 "B<sem_open>() returns B<SEM_FAILED>, with I<errno> set to indicate the "
600 "成功すると、 B<sem_open>() は新しいセマフォのアドレスを返す。 このアドレスは"
601 "他のセマフォ関連の関数を呼び出す際に使用される。 エラーの場合、 B<sem_open>"
602 "() は B<SEM_FAILED> を返し、 I<errno> にエラーを示す値をセットする。"
605 #: build/C/man3/sem_open.3:117 build/C/man3/sem_unlink.3:51
606 #: build/C/man2/semctl.2:389 build/C/man2/semget.2:165
607 #: build/C/man2/semop.2:331
613 #: build/C/man3/sem_open.3:121
615 "The semaphore exists, but the caller does not have permission to open it."
617 "そのセマフォが存在するが、呼び出し元にはそのセマフォをオープンする 許可がな"
621 #: build/C/man3/sem_open.3:121 build/C/man2/semget.2:173
627 #: build/C/man3/sem_open.3:132
629 "Both B<O_CREAT> and B<O_EXCL> were specified in I<oflag>, but a semaphore "
630 "with this I<name> already exists."
632 "I<oflag> に B<O_CREAT> と B<O_EXCL> の両方が指定されたが、 I<name> という名前"
636 #: build/C/man3/sem_open.3:137
637 msgid "I<value> was greater than B<SEM_VALUE_MAX>."
638 msgstr "I<value> が B<SEM_VALUE_MAX> よりも大きい。"
641 #: build/C/man3/sem_open.3:141
642 msgid "I<name> consists of just \"/\", followed by no other characters."
644 "I<name> が \"/\" だけで構成され、その後ろに他の文字が続いていなかった。"
647 #: build/C/man3/sem_open.3:141
653 #: build/C/man3/sem_open.3:144
654 msgid "The process already has the maximum number of files and open."
655 msgstr "オープンされたファイル数がすでにそのプロセスにおける上限に達している。"
658 #: build/C/man3/sem_open.3:144 build/C/man3/sem_unlink.3:54
660 msgid "B<ENAMETOOLONG>"
661 msgstr "B<ENAMETOOLONG>"
664 #: build/C/man3/sem_open.3:148 build/C/man3/sem_unlink.3:58
665 msgid "I<name> was too long."
666 msgstr "I<name> が長すぎる。"
669 #: build/C/man3/sem_open.3:148
675 #: build/C/man3/sem_open.3:151
676 msgid "The system limit on the total number of open files has been reached."
677 msgstr "オープンされたファイル総数がシステム全体での上限に達している。"
680 #: build/C/man3/sem_open.3:151 build/C/man3/sem_unlink.3:58
681 #: build/C/man2/semget.2:197
686 #. this error can occur if we have a name of the (nonportable) form
687 #. /dir/name, and the directory /dev/shm/dir does not exist.
689 #: build/C/man3/sem_open.3:167
691 "The B<O_CREAT> flag was not specified in I<oflag> and no semaphore with this "
692 "I<name> exists; or, B<O_CREAT> was specified, but I<name> wasn't well formed."
694 "I<oflag> に B<O_CREAT> フラグが指定されておらず、 I<name> という名前のセマ"
695 "フォも存在しない。 または、 B<O_CREAT> が指定されたが、 I<name> が適切な形式"
699 #: build/C/man3/sem_open.3:167 build/C/man2/semget.2:205
700 #: build/C/man2/semop.2:374
706 #: build/C/man3/sem_open.3:170
707 msgid "Insufficient memory."
711 #: build/C/man3/sem_open.3:178
713 "B<sem_close>(3), B<sem_getvalue>(3), B<sem_post>(3), B<sem_unlink>(3), "
714 "B<sem_wait>(3), B<sem_overview>(7)"
716 "B<sem_close>(3), B<sem_getvalue>(3), B<sem_post>(3), B<sem_unlink>(3), "
717 "B<sem_wait>(3), B<sem_overview>(7)"
720 #: build/C/man7/sem_overview.7:26
723 msgstr "SEM_OVERVIEW"
726 #: build/C/man7/sem_overview.7:26
732 #: build/C/man7/sem_overview.7:29
733 msgid "sem_overview - Overview of POSIX semaphores"
734 msgstr "sem_overview - POSIX セマフォの概要"
737 #: build/C/man7/sem_overview.7:31
739 "POSIX semaphores allow processes and threads to synchronize their actions."
741 "POSIX セマフォを使用すると、プロセスやスレッド間でその動作を 同期させることが"
745 #: build/C/man7/sem_overview.7:41
747 "A semaphore is an integer whose value is never allowed to fall below zero. "
748 "Two operations can be performed on semaphores: increment the semaphore value "
749 "by one (B<sem_post>(3)); and decrement the semaphore value by one "
750 "(B<sem_wait>(3)). If the value of a semaphore is currently zero, then a "
751 "B<sem_wait>(3) operation will block until the value becomes greater than "
754 "セマフォは整数であり、その値は決して 0 未満になることは許されない。 セマフォ"
755 "に対してできる操作は 2 つである: セマフォ値を 1 増やす (B<sem_post>(3)); セマ"
756 "フォ値を 1 減らす (B<sem_wait>(3))。 セマフォの値がすでに 0 の場合、セマフォ"
757 "値が 0 より大きくなるまで B<sem_wait>(3) 操作は停止 (block) する。"
760 #: build/C/man7/sem_overview.7:44
762 "POSIX semaphores come in two forms: named semaphores and unnamed semaphores."
764 "POSIX セマフォには、名前付きセマフォ (named semaphore) と 名前なしセマフォ "
765 "(unnamed semaphore) の 2つの形がある。"
768 #: build/C/man7/sem_overview.7:44
770 msgid "B<Named semaphores>"
773 #. glibc allows the initial slash to be omitted, and makes
774 #. multiple initial slashes equivalent to a single slash.
775 #. This differs from the implementation of POSIX message queues.
776 #. glibc allows subdirectory components in the name, in which
777 #. case the subdirectory tree must exist under /dev/shm, and
778 #. the fist subdirectory component must exist as the name
779 #. sem.name, and all of the subdirectory components must allow the
780 #. required permissions if a user wants to create a semaphore
781 #. object in a subdirectory.
783 #: build/C/man7/sem_overview.7:64
785 "A named semaphore is identified by a name of the form I</somename>; that is, "
786 "a null-terminated string of up to B<NAME_MAX>I<-4> (i.e., 251) characters "
787 "consisting of an initial slash, followed by one or more characters, none of "
788 "which are slashes. Two processes can operate on the same named semaphore by "
789 "passing the same name to B<sem_open>(3)."
791 "名前付きセマフォは I</somename> という形式の名前で識別される。 その名前は、最"
792 "大で B<NAME_MAX>I<-4> (すなわち 251) 文字の NULL 終端された文字列で、 スラッ"
793 "シュで始まり、スラッシュ以外の文字が 1 文字以上続く形式である。 B<sem_open>"
794 "(3) に同じ名前を渡すことにより、2 つのプロセス間で同じ名前のセマフォ に対し"
798 #: build/C/man7/sem_overview.7:79
800 "The B<sem_open>(3) function creates a new named semaphore or opens an "
801 "existing named semaphore. After the semaphore has been opened, it can be "
802 "operated on using B<sem_post>(3) and B<sem_wait>(3). When a process has "
803 "finished using the semaphore, it can use B<sem_close>(3) to close the "
804 "semaphore. When all processes have finished using the semaphore, it can be "
805 "removed from the system using B<sem_unlink>(3)."
807 "B<sem_open>(3) 関数は、新しい名前付きセマフォを作成するか、既に存在する名前"
808 "付き セマフォをオープンする。 セマフォをオープンした後は、 B<sem_post>(3) "
809 "と B<sem_wait>(3) を使ってセマフォを操作できる。 プロセスがセマフォの使用を"
810 "終えた際は、 B<sem_close>(3) を使ってセマフォをクローズできる。 あるセマフォ"
811 "をどのプロセスも使用しなくなると、 B<sem_unlink>(3) を使ってそのセマフォをシ"
815 #: build/C/man7/sem_overview.7:79
817 msgid "B<Unnamed semaphores (memory-based semaphores)>"
818 msgstr "B<名前なしセマフォ (メモリベース・セマフォ)>"
821 #: build/C/man7/sem_overview.7:94
823 "An unnamed semaphore does not have a name. Instead the semaphore is placed "
824 "in a region of memory that is shared between multiple threads (a I<thread-"
825 "shared semaphore>) or processes (a I<process-shared semaphore>). A thread-"
826 "shared semaphore is placed in an area of memory shared between the threads "
827 "of a process, for example, a global variable. A process-shared semaphore "
828 "must be placed in a shared memory region (e.g., a System V shared memory "
829 "segment created using B<shmget>(2), or a POSIX shared memory object built "
830 "created using B<shm_open>(3))."
832 "名前なしセマフォは名前を持たない。その代わり、セマフォは、 複数スレッド間で共"
833 "有されるメモリ領域、もしくは複数プロセス間で 共有されたメモリ領域に置かれる "
834 "(前者を I<スレッド共有セマフォ (thread-shared semaphore)>、 後者を I<プロセス"
835 "共有セマフォ (process-shared semaphore)> と呼ぶ)。スレッド共有セマフォは、同"
836 "じプロセス内のスレッド間で共有される メモリ領域、例えば大域変数 (global "
837 "variable) に配置される。 プロセス共有セマフォは、共有メモリ領域 (例えば、 "
838 "B<shmget>(2) を使って作成できる System V 共有メモリ・セグメントや "
839 "B<shm_open>(3) を使って作成できる POSIX 共有メモリ・オブジェクト) 内に配置"
843 #: build/C/man7/sem_overview.7:105
845 "Before being used, an unnamed semaphore must be initialized using B<sem_init>"
846 "(3). It can then be operated on using B<sem_post>(3) and B<sem_wait>(3). "
847 "When the semaphore is no longer required, and before the memory in which it "
848 "is located is deallocated, the semaphore should be destroyed using "
851 "名前なしセマフォは、使用する前に B<sem_init>(3) を使って初期化しなければなら"
852 "ない。 セマフォは B<sem_post>(3) と B<sem_wait>(3) を使って操作できる。 セ"
853 "マフォがもはや必要なくなったときや、 セマフォが置かれているメモリを解放する前"
854 "には、 B<sem_destroy>(3) を使ってセマフォを破棄すべきである。"
857 #: build/C/man7/sem_overview.7:108
859 "The remainder of this section describes some specific details of the Linux "
860 "implementation of POSIX semaphores."
862 "この節の残りでは、POSIX セマフォの Linux の実装の詳細 について説明する。"
865 #: build/C/man7/sem_overview.7:108
871 #: build/C/man7/sem_overview.7:114
873 "Prior to kernel 2.6, Linux only supported unnamed, thread-shared "
874 "semaphores. On a system with Linux 2.6 and a glibc that provides the NPTL "
875 "threading implementation, a complete implementation of POSIX semaphores is "
878 "バージョン 2.6 より前のカーネルでは、Linux は 名前なしのスレッド共有セマフォ"
879 "のみをサポートしていた。 Linux 2.6 と NPTL スレッド実装を提供している glibc "
880 "が入った システムでは、POSIX セマフォの完全な実装が提供される。"
883 #: build/C/man7/sem_overview.7:114
889 #: build/C/man7/sem_overview.7:119
891 "POSIX named semaphores have kernel persistence: if not removed by "
892 "B<sem_unlink>(3), a semaphore will exist until the system is shut down."
894 "POSIX 名前付きセマフォはカーネル内で保持される。 B<sem_unlink>(3) で削除され"
895 "なければ、セマフォは システムがシャットダウンされるまで存在し続ける。"
898 #: build/C/man7/sem_overview.7:119
904 #: build/C/man7/sem_overview.7:124
906 "Programs using the POSIX semaphores API must be compiled with I<cc -lrt> to "
907 "link against the real-time library, I<librt>."
909 "POSIX セマフォ API を使用したプログラムは I<cc -lrt> でコンパイルし、リアルタ"
910 "イムライブラリ I<librt> とリンクしなければならない。"
913 #: build/C/man7/sem_overview.7:124
915 msgid "Accessing named semaphores via the file system"
916 msgstr "ファイルシステム経由での名前付きセマフォへのアクセス"
919 #: build/C/man7/sem_overview.7:135
921 "On Linux, named semaphores are created in a virtual file system, normally "
922 "mounted under I</dev/shm>, with names of the form B<sem.>I<somename>. (This "
923 "is the reason that semaphore names are limited to B<NAME_MAX>I<-4> rather "
924 "than B<NAME_MAX> characters.)"
926 "Linux では、名前付きセマフォは仮想ファイルシステム (virtual file system) 内"
927 "に B<sem.>I<somename> という形の名前で作成される。仮想ファイルシステムは通常 "
928 "I</dev/shm> 以下にマウントされる。 (これが、セマフォの名前の文字数の上限が "
929 "B<NAME_MAX> ではなく B<NAME_MAX>I<-4> となっている理由である。)"
932 #: build/C/man7/sem_overview.7:138
934 "Since Linux 2.6.19, ACLs can be placed on files under this directory, to "
935 "control object permissions on a per-user and per-group basis."
937 "Linux 2.6.19 以降では、このディレクトリ配下のファイルに対して ACL を 設定で"
938 "き、オブジェクトへの許可をユーザ単位、グループ単位で制御することが できる。"
941 #: build/C/man7/sem_overview.7:149
943 "System V semaphores (B<semget>(2), B<semop>(2), etc.) are an older semaphore "
944 "API. POSIX semaphores provide a simpler, and better designed interface than "
945 "System V semaphores; on the other hand POSIX semaphores are less widely "
946 "available (especially on older systems) than System V semaphores."
948 "System V セマフォ (B<semget>(2), B<semop>(2) など) は古いセマフォ API であ"
949 "る。 POSIX セマフォは System V よりも 簡単で、うまく設計されたインタフェース"
950 "を提供している。 一方で、POSIX セマフォは System V セマフォと比べると 利用で"
951 "きるシステムが少ない (特に、古いシステムでは少ない)。"
954 #: build/C/man7/sem_overview.7:149 build/C/man3/sem_post.3:67
955 #: build/C/man3/sem_wait.3:153 build/C/man2/semop.2:488
961 #: build/C/man7/sem_overview.7:152
963 "An example of the use of various POSIX semaphore functions is shown in "
966 "各種の POSIX セマフォ関数を使用した例が B<sem_wait>(3) に記載されている。"
969 #: build/C/man7/sem_overview.7:161
971 "B<sem_close>(3), B<sem_destroy>(3), B<sem_getvalue>(3), B<sem_init>(3), "
972 "B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), B<sem_wait>(3), B<pthreads>"
975 "B<sem_close>(3), B<sem_destroy>(3), B<sem_getvalue>(3), B<sem_init>(3), "
976 "B<sem_open>(3), B<sem_post>(3), B<sem_unlink>(3), B<sem_wait>(3), B<pthreads>"
980 #: build/C/man3/sem_post.3:26
986 #: build/C/man3/sem_post.3:26
992 #: build/C/man3/sem_post.3:29
993 msgid "sem_post - unlock a semaphore"
994 msgstr "sem_post - セマフォのロックを解除する"
997 #: build/C/man3/sem_post.3:34
999 msgid "B<int sem_post(sem_t *>I<sem>B<);>\n"
1000 msgstr "B<int sem_post(sem_t *>I<sem>B<);>\n"
1003 #: build/C/man3/sem_post.3:45
1005 "B<sem_post>() increments (unlocks) the semaphore pointed to by I<sem>. If "
1006 "the semaphore's value consequently becomes greater than zero, then another "
1007 "process or thread blocked in a B<sem_wait>(3) call will be woken up and "
1008 "proceed to lock the semaphore."
1010 "B<sem_post>() は、 I<sem> が指すセマフォの値を 1 増やす (ロックを解除する)。"
1011 "その結果、 セマフォの値は 0 より大きな値に変化し、 B<sem_wait>(3) で停止して"
1012 "いる別のプロセスやスレッドが呼び起こされ、 セマフォをロックできるようになる。"
1015 #: build/C/man3/sem_post.3:52
1017 "B<sem_post>() returns 0 on success; on error, the value of the semaphore is "
1018 "left unchanged, -1 is returned, and I<errno> is set to indicate the error."
1020 "成功すると、 B<sem_post>() は 0 を返す。エラーの場合、セマフォの値は変更せず"
1021 "に、 -1 を返し、 I<errno> にエラーを示す値をセットする。"
1024 #: build/C/man3/sem_post.3:57
1026 msgid "B<EOVERFLOW>"
1027 msgstr "B<EOVERFLOW>"
1029 #. Added in POSIX.1-2008 TC1 (Austin Interpretation 213)
1031 #: build/C/man3/sem_post.3:61
1032 msgid "The maximum allowable value for a semaphore would be exceeded."
1033 msgstr "一つのセマフォで使用できる最大値を超えてしまうところであった。"
1036 #: build/C/man3/sem_post.3:67
1038 "B<sem_post>() is async-signal-safe: it may be safely called within a signal "
1041 "B<sem_post>() は async-signal-safe である。 つまり、シグナルハンドラの中でも"
1045 #: build/C/man3/sem_post.3:70
1046 msgid "See B<sem_wait>(3)."
1047 msgstr "B<sem_wait>(3) 参照。"
1050 #: build/C/man3/sem_post.3:73
1051 msgid "B<sem_getvalue>(3), B<sem_wait>(3), B<sem_overview>(7)"
1052 msgstr "B<sem_getvalue>(3), B<sem_wait>(3), B<sem_overview>(7)"
1055 #: build/C/man3/sem_unlink.3:26
1061 #: build/C/man3/sem_unlink.3:29
1062 msgid "sem_unlink - remove a named semaphore"
1063 msgstr "sem_unlink - 名前付きセマフォを削除する"
1066 #: build/C/man3/sem_unlink.3:34
1068 msgid "B<int sem_unlink(const char *>I<name>B<);>\n"
1069 msgstr "B<int sem_unlink(const char *>I<name>B<);>\n"
1072 #: build/C/man3/sem_unlink.3:44
1074 "B<sem_unlink>() removes the named semaphore referred to by I<name>. The "
1075 "semaphore name is removed immediately. The semaphore is destroyed once all "
1076 "other processes that have the semaphore open close it."
1078 "B<sem_unlink>() は、 I<name> で参照される名前付きセマフォを削除する。 セマ"
1079 "フォの名前は直ちに削除される。 このセマフォをオープンしている他のすべてのプロ"
1080 "セスがセマフォを 閉じて初めてセマフォの削除が行われる。"
1083 #: build/C/man3/sem_unlink.3:50
1085 "On success B<sem_unlink>() returns 0; on error, -1 is returned, with "
1086 "I<errno> set to indicate the error."
1088 "成功すると、 B<sem_unlink>() は 0 を返す。エラーの場合、-1 を返し、 "
1089 "I<errno> にエラーを示す値をセットする。"
1092 #: build/C/man3/sem_unlink.3:54
1093 msgid "The caller does not have permission to unlink this semaphore."
1094 msgstr "呼び出し元にはこのセマフォを削除する許可がない。"
1097 #: build/C/man3/sem_unlink.3:62
1098 msgid "There is no semaphore with the given I<name>."
1099 msgstr "指定された名前 I<name> のセマフォが存在しない。"
1102 #: build/C/man3/sem_unlink.3:69
1104 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_wait>(3), "
1105 "B<sem_overview>(7)"
1107 "B<sem_getvalue>(3), B<sem_open>(3), B<sem_post>(3), B<sem_wait>(3), "
1108 "B<sem_overview>(7)"
1111 #: build/C/man3/sem_wait.3:26
1117 #: build/C/man3/sem_wait.3:26
1123 #: build/C/man3/sem_wait.3:29
1124 msgid "sem_wait, sem_timedwait, sem_trywait - lock a semaphore"
1125 msgstr "sem_wait, sem_timedwait, sem_trywait - セマフォをロックする"
1128 #: build/C/man3/sem_wait.3:34
1130 msgid "B<int sem_wait(sem_t *>I<sem>B<);>\n"
1131 msgstr "B<int sem_wait(sem_t *>I<sem>B<);>\n"
1134 #: build/C/man3/sem_wait.3:36
1136 msgid "B<int sem_trywait(sem_t *>I<sem>B<);>\n"
1137 msgstr "B<int sem_trywait(sem_t *>I<sem>B<);>\n"
1140 #: build/C/man3/sem_wait.3:38
1142 msgid "B<int sem_timedwait(sem_t *>I<sem>B<, const struct timespec *>I<abs_timeout>B<);>\n"
1143 msgstr "B<int sem_timedwait(sem_t *>I<sem>B<, const struct timespec *>I<abs_timeout>B<);>\n"
1146 #: build/C/man3/sem_wait.3:45 build/C/man2/semop.2:51
1148 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1149 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
1152 #: build/C/man3/sem_wait.3:49
1154 "B<sem_timedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
1157 "B<sem_timedwait>(): _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ "
1161 #: build/C/man3/sem_wait.3:59
1163 "B<sem_wait>() decrements (locks) the semaphore pointed to by I<sem>. If "
1164 "the semaphore's value is greater than zero, then the decrement proceeds, and "
1165 "the function returns, immediately. If the semaphore currently has the value "
1166 "zero, then the call blocks until either it becomes possible to perform the "
1167 "decrement (i.e., the semaphore value rises above zero), or a signal handler "
1168 "interrupts the call."
1170 "B<sem_wait>() は I<sem> が指すセマフォの値を 1 減らす (ロックする)。 セマ"
1171 "フォの値が 0 より大きい場合、減算が実行され、関数は直ちに復帰する。 セマフォ"
1172 "の現在値が 0 の場合には、減算を実行できるようになる (つまり、セマフォの値が "
1173 "0 より大きな値になる) まで、もしくは シグナルハンドラによって呼び出しが中断さ"
1174 "れるまで、 関数呼び出しは停止 (block) する。"
1177 #: build/C/man3/sem_wait.3:69
1179 "B<sem_trywait>() is the same as B<sem_wait>(), except that if the decrement "
1180 "cannot be immediately performed, then call returns an error (I<errno> set to "
1181 "B<EAGAIN>) instead of blocking."
1183 "B<sem_trywait>() は B<sem_wait>() と同じだが、セマフォ値の減算をすぐに実行"
1184 "できなかった場合に、 停止 (block) するのではなくエラーで復帰する (I<errno> "
1185 "に B<EAGAIN> がセットされる) 点が異なる。"
1188 #: build/C/man3/sem_wait.3:82
1190 "B<sem_timedwait>() is the same as B<sem_wait>(), except that I<abs_timeout> "
1191 "specifies a limit on the amount of time that the call should block if the "
1192 "decrement cannot be immediately performed. The I<abs_timeout> argument "
1193 "points to a structure that specifies an absolute timeout in seconds and "
1194 "nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This "
1195 "structure is defined as follows:"
1197 "B<sem_timedwait>() は B<sem_wait>() と同じだが、セマフォ値の減算をすぐに実"
1198 "行できなかった場合に 関数呼び出しが停止する時間の上限を I<abs_timeout> で指定"
1199 "する点が異なる。 I<abs_timeout> 引き数は、タイムアウト時刻を指定する構造体へ"
1200 "のポインタである。 この構造体には、タイムアウト時刻を時刻紀元 (Epoch; "
1201 "1970-01-01 00:00:00 +0000 (UTC)) からの 経過時間 (秒+ナノ秒) で指定する。 構"
1205 #: build/C/man3/sem_wait.3:89
1208 "struct timespec {\n"
1209 " time_t tv_sec; /* Seconds */\n"
1210 " long tv_nsec; /* Nanoseconds [0 .. 999999999] */\n"
1213 "struct timespec {\n"
1214 " time_t tv_sec; /* Seconds */\n"
1215 " long tv_nsec; /* Nanoseconds [0 .. 999999999] */\n"
1219 #: build/C/man3/sem_wait.3:100
1221 "If the timeout has already expired by the time of the call, and the "
1222 "semaphore could not be locked immediately, then B<sem_timedwait>() fails "
1223 "with a timeout error (I<errno> set to B<ETIMEDOUT>)."
1225 "関数呼び出し時点ですでにタイムアウトに指定した時刻が過ぎており、 かつセマフォ"
1226 "をすぐにロックできなかった場合は、 B<sem_timedwait>() はタイムアウトエラー "
1227 "(I<errno> に B<ETIMEDOUT> がセットされる) で失敗する。"
1230 #: build/C/man3/sem_wait.3:108
1232 "If the operation can be performed immediately, then B<sem_timedwait>() "
1233 "never fails with a timeout error, regardless of the value of "
1234 "I<abs_timeout>. Furthermore, the validity of I<abs_timeout> is not checked "
1237 "セマフォ操作がすぐに実行できるときは、 I<abs_timeout> がどんな値であっても "
1238 "B<sem_timedwait>() が失敗することは決してない。さらにいうと、この場合には "
1239 "I<abs_timeout> の正当性の検査は行われない。"
1242 #: build/C/man3/sem_wait.3:114
1244 "All of these functions return 0 on success; on error, the value of the "
1245 "semaphore is left unchanged, -1 is returned, and I<errno> is set to indicate "
1248 "成功すると、これらの関数は 0 を返す。 エラーの場合、セマフォの値を変更せず"
1249 "に、-1 を返し、 I<errno> にエラーを示す値をセットする。"
1252 #: build/C/man3/sem_wait.3:115 build/C/man2/semop.2:363
1258 #: build/C/man3/sem_wait.3:119
1259 msgid "The call was interrupted by a signal handler; see B<signal>(7)."
1260 msgstr "呼び出しはシグナルハンドラにより中断された。 B<signal>(7) 参照。"
1263 #: build/C/man3/sem_wait.3:126
1264 msgid "The following additional error can occur for B<sem_trywait>():"
1265 msgstr "B<sem_trywait>() の場合には、上記に加えて以下のエラーも起こる。"
1268 #: build/C/man3/sem_wait.3:126 build/C/man2/semop.2:338
1274 #: build/C/man3/sem_wait.3:130
1276 "The operation could not be performed without blocking (i.e., the semaphore "
1277 "currently has the value zero)."
1279 "停止 (block) せずにロック操作を完了できなかった (つまり、 セマフォの現在の値"
1283 #: build/C/man3/sem_wait.3:133
1284 msgid "The following additional errors can occur for B<sem_timedwait>():"
1285 msgstr "B<sem_timedwait>() の場合、以下のエラーも起こる。"
1288 #: build/C/man3/sem_wait.3:138
1290 "The value of I<abs_timeout.tv_nsecs> is less than 0, or greater than or "
1291 "equal to 1000 million."
1293 "I<abs_timeout.tv_nsecs> の値が 0 未満、もしくは 1,000,000,000 以上である。"
1296 #: build/C/man3/sem_wait.3:138
1298 msgid "B<ETIMEDOUT>"
1299 msgstr "B<ETIMEDOUT>"
1301 #. POSIX.1-2001 also allows EDEADLK -- "A deadlock condition
1302 #. was detected", but this does not occur on Linux(?).
1304 #: build/C/man3/sem_wait.3:143
1305 msgid "The call timed out before the semaphore could be locked."
1306 msgstr "セマフォのロックに成功する前に時間切れとなった。"
1308 #. sem_wait() is always interrupted on most other implementations,
1309 #. but on FreeBSD 5.4 SA_RESTART does cause restarting.
1311 #: build/C/man3/sem_wait.3:153
1313 "A signal handler always interrupts a blocked call to one of these functions, "
1314 "regardless of the use of the B<sigaction>(2) B<SA_RESTART> flag."
1316 "シグナルハンドラは、 B<sigaction>(2) の B<SA_RESTART> フラグを使用しているか"
1317 "どうかに関わらず、これらの関数の呼び出しが 停止している場合、シグナルハンドラ"
1321 #: build/C/man3/sem_wait.3:172
1323 "The (somewhat trivial) program shown below operates on an unnamed "
1324 "semaphore. The program expects two command-line arguments. The first "
1325 "argument specifies a seconds value that is used to set an alarm timer to "
1326 "generate a B<SIGALRM> signal. This handler performs a B<sem_post>(3) to "
1327 "increment the semaphore that is being waited on in I<main()> using "
1328 "B<sem_timedwait>(). The second command-line argument specifies the length "
1329 "of the timeout, in seconds, for B<sem_timedwait>(). The following shows "
1330 "what happens on two different runs of the program:"
1332 "以下に示す (ちょっとした) プログラムは名前なしセマフォの操作を行う。 プログラ"
1333 "ムはコマンドライン引き数を 2 つ取る。 最初の引き数には、 B<SIGALRM> シグナル"
1334 "を生成するためのアラームタイマーの設定に使われる値を 秒単位で指定する。このシ"
1335 "グナルハンドラは、 I<main()> 内で B<sem_timedwait>() を使って待っているセマ"
1336 "フォを、 B<sem_post>(3) を使って加算する。 2番目の引き数には、 "
1337 "B<sem_timedwait>() に渡すタイムアウトまでの時間を秒単位で指定する。"
1340 #: build/C/man3/sem_wait.3:182
1343 "$B< ./a.out 2 3>\n"
1344 "About to call sem_timedwait()\n"
1345 "sem_post() from handler\n"
1346 "sem_timedwait() succeeded\n"
1347 "$B< ./a.out 2 1>\n"
1348 "About to call sem_timedwait()\n"
1349 "sem_timedwait() timed out\n"
1351 "$B< ./a.out 2 3>\n"
1352 "About to call sem_timedwait()\n"
1353 "sem_post() from handler\n"
1354 "sem_timedwait() succeeded\n"
1355 "$B< ./a.out 2 1>\n"
1356 "About to call sem_timedwait()\n"
1357 "sem_timedwait() timed out\n"
1360 #: build/C/man3/sem_wait.3:184
1362 msgid "Program source"
1366 #: build/C/man3/sem_wait.3:195
1369 "#include E<lt>unistd.hE<gt>\n"
1370 "#include E<lt>stdio.hE<gt>\n"
1371 "#include E<lt>stdlib.hE<gt>\n"
1372 "#include E<lt>semaphore.hE<gt>\n"
1373 "#include E<lt>time.hE<gt>\n"
1374 "#include E<lt>assert.hE<gt>\n"
1375 "#include E<lt>errno.hE<gt>\n"
1376 "#include E<lt>signal.hE<gt>\n"
1378 "#include E<lt>unistd.hE<gt>\n"
1379 "#include E<lt>stdio.hE<gt>\n"
1380 "#include E<lt>stdlib.hE<gt>\n"
1381 "#include E<lt>semaphore.hE<gt>\n"
1382 "#include E<lt>time.hE<gt>\n"
1383 "#include E<lt>assert.hE<gt>\n"
1384 "#include E<lt>errno.hE<gt>\n"
1385 "#include E<lt>signal.hE<gt>\n"
1388 #: build/C/man3/sem_wait.3:197
1390 msgid "sem_t sem;\n"
1391 msgstr "sem_t sem;\n"
1394 #: build/C/man3/sem_wait.3:200
1397 "#define handle_error(msg) \\e\n"
1398 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1400 "#define handle_error(msg) \\e\n"
1401 " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1404 #: build/C/man3/sem_wait.3:210
1408 "handler(int sig)\n"
1410 " write(STDOUT_FILENO, \"sem_post() from handler\\en\", 24);\n"
1411 " if (sem_post(&sem) == -1) {\n"
1412 " write(STDERR_FILENO, \"sem_post() failed\\en\", 18);\n"
1413 " _exit(EXIT_FAILURE);\n"
1418 "handler(int sig)\n"
1420 " write(STDOUT_FILENO, \"sem_post() from handler\\en\", 24);\n"
1421 " if (sem_post(&sem) == -1) {\n"
1422 " write(STDERR_FILENO, \"sem_post() failed\\en\", 18);\n"
1423 " _exit(EXIT_FAILURE);\n"
1428 #: build/C/man3/sem_wait.3:217
1432 "main(int argc, char *argv[])\n"
1434 " struct sigaction sa;\n"
1435 " struct timespec ts;\n"
1439 "main(int argc, char *argv[])\n"
1441 " struct sigaction sa;\n"
1442 " struct timespec ts;\n"
1446 #: build/C/man3/sem_wait.3:223
1449 " if (argc != 3) {\n"
1450 " fprintf(stderr, \"Usage: %s E<lt>alarm-secsE<gt> E<lt>wait-secsE<gt>\\en\",\n"
1452 " exit(EXIT_FAILURE);\n"
1455 " if (argc != 3) {\n"
1456 " fprintf(stderr, \"Usage: %s E<lt>alarm-secsE<gt> E<lt>wait-secsE<gt>\\en\",\n"
1458 " exit(EXIT_FAILURE);\n"
1462 #: build/C/man3/sem_wait.3:226
1465 " if (sem_init(&sem, 0, 0) == -1)\n"
1466 " handle_error(\"sem_init\");\n"
1468 " if (sem_init(&sem, 0, 0) == -1)\n"
1469 " handle_error(\"sem_init\");\n"
1472 #: build/C/man3/sem_wait.3:228
1474 msgid " /* Establish SIGALRM handler; set alarm timer using argv[1] */\n"
1475 msgstr " /* Establish SIGALRM handler; set alarm timer using argv[1] */\n"
1478 #: build/C/man3/sem_wait.3:234
1481 " sa.sa_handler = handler;\n"
1482 " sigemptyset(&sa.sa_mask);\n"
1483 " sa.sa_flags = 0;\n"
1484 " if (sigaction(SIGALRM, &sa, NULL) == -1)\n"
1485 " handle_error(\"sigaction\");\n"
1487 " sa.sa_handler = handler;\n"
1488 " sigemptyset(&sa.sa_mask);\n"
1489 " sa.sa_flags = 0;\n"
1490 " if (sigaction(SIGALRM, &sa, NULL) == -1)\n"
1491 " handle_error(\"sigaction\");\n"
1494 #: build/C/man3/sem_wait.3:236
1496 msgid " alarm(atoi(argv[1]));\n"
1497 msgstr " alarm(atoi(argv[1]));\n"
1500 #: build/C/man3/sem_wait.3:239
1503 " /* Calculate relative interval as current time plus\n"
1504 " number of seconds given argv[2] */\n"
1506 " /* Calculate relative interval as current time plus\n"
1507 " number of seconds given argv[2] */\n"
1510 #: build/C/man3/sem_wait.3:242
1513 " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n"
1514 " handle_error(\"clock_gettime\");\n"
1516 " if (clock_gettime(CLOCK_REALTIME, &ts) == -1)\n"
1517 " handle_error(\"clock_gettime\");\n"
1520 #: build/C/man3/sem_wait.3:244
1522 msgid " ts.tv_sec += atoi(argv[2]);\n"
1523 msgstr " ts.tv_sec += atoi(argv[2]);\n"
1526 #: build/C/man3/sem_wait.3:248
1529 " printf(\"main() about to call sem_timedwait()\\en\");\n"
1530 " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n"
1531 " continue; /* Restart if interrupted by handler */\n"
1533 " printf(\"main() about to call sem_timedwait()\\en\");\n"
1534 " while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR)\n"
1535 " continue; /* Restart if interrupted by handler */\n"
1538 #: build/C/man3/sem_wait.3:250
1540 msgid " /* Check what happened */\n"
1541 msgstr " /* Check what happened */\n"
1544 #: build/C/man3/sem_wait.3:258
1548 " if (errno == ETIMEDOUT)\n"
1549 " printf(\"sem_timedwait() timed out\\en\");\n"
1551 " perror(\"sem_timedwait\");\n"
1553 " printf(\"sem_timedwait() succeeded\\en\");\n"
1556 " if (errno == ETIMEDOUT)\n"
1557 " printf(\"sem_timedwait() timed out\\en\");\n"
1559 " perror(\"sem_timedwait\");\n"
1561 " printf(\"sem_timedwait() succeeded\\en\");\n"
1564 #: build/C/man3/sem_wait.3:261
1567 " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n"
1570 " exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);\n"
1574 #: build/C/man3/sem_wait.3:267
1576 "B<clock_gettime>(2), B<sem_getvalue>(3), B<sem_post>(3), B<sem_overview>(7), "
1579 "B<clock_gettime>(2), B<sem_getvalue>(3), B<sem_post>(3), B<sem_overview>(7), "
1583 #: build/C/man2/semctl.2:39
1589 #: build/C/man2/semctl.2:39
1595 #: build/C/man2/semctl.2:42
1596 msgid "semctl - semaphore control operations"
1597 msgstr "semctl - セマフォの制御操作を行なう"
1600 #: build/C/man2/semctl.2:47 build/C/man2/semget.2:42 build/C/man2/semop.2:41
1603 "B<#include E<lt>sys/types.hE<gt>>\n"
1604 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1605 "B<#include E<lt>sys/sem.hE<gt>>\n"
1607 "B<#include E<lt>sys/types.hE<gt>>\n"
1608 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1609 "B<#include E<lt>sys/sem.hE<gt>>\n"
1612 #: build/C/man2/semctl.2:49
1614 msgid "B<int semctl(int >I<semid>B<, int >I<semnum>B<, int >I<cmd>B<, ...);>\n"
1615 msgstr "B<int semctl(int >I<semid>B<, int >I<semnum>B<, int >I<cmd>B<, ...);>\n"
1618 #: build/C/man2/semctl.2:60
1620 "B<semctl>() performs the control operation specified by I<cmd> on the "
1621 "semaphore set identified by I<semid>, or on the I<semnum>-th semaphore of "
1622 "that set. (The semaphores in a set are numbered starting at 0.)"
1624 "B<semctl>() は、 I<semid> で指定されたセマフォ集合 (semaphore set) またはセ"
1625 "マフォ集合の I<semnun> 番目のセマフォに対して、 I<cmd> で指定された制御操作を"
1626 "行なう (集合内のセマフォの番号は 0 から始まる)。"
1629 #: build/C/man2/semctl.2:66
1631 "This function has three or four arguments, depending on I<cmd>. When there "
1632 "are four, the fourth has the type I<union semun>. The I<calling program> "
1633 "must define this union as follows:"
1635 "この関数は、 I<cmd> の値に依存して、3 個または 4 個の引き数を持つ。 引き数が "
1636 "4 個の場合、第 4 引き数の型は I<union semun> である。 I<呼び出し元プログラム>"
1637 "は、 この共用体 (union) を以下のように定義しなければならない。"
1640 #: build/C/man2/semctl.2:76
1644 " int val; /* Value for SETVAL */\n"
1645 " struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */\n"
1646 " unsigned short *array; /* Array for GETALL, SETALL */\n"
1647 " struct seminfo *__buf; /* Buffer for IPC_INFO\n"
1648 " (Linux-specific) */\n"
1652 " int val; /* SETVAL の値 */\n"
1653 " struct semid_ds *buf; /* IPC_STAT, IPC_SET 用のバッファ */\n"
1654 " unsigned short *array; /* GETALL, SETALL 用の配列 */\n"
1655 " struct seminfo *__buf; /* IPC_INFO 用のバッファ\n"
1660 #: build/C/man2/semctl.2:82
1662 "The I<semid_ds> data structure is defined in I<E<lt>sys/sem.hE<gt>> as "
1665 "I<semid_ds> データ構造体は I<E<lt>sys/sem.hE<gt>> で以下のように定義されてい"
1669 #: build/C/man2/semctl.2:91
1672 "struct semid_ds {\n"
1673 " struct ipc_perm sem_perm; /* Ownership and permissions */\n"
1674 " time_t sem_otime; /* Last semop time */\n"
1675 " time_t sem_ctime; /* Last change time */\n"
1676 " unsigned short sem_nsems; /* No. of semaphores in set */\n"
1679 "struct semid_ds {\n"
1680 " struct ipc_perm sem_perm; /* 所有権と許可 */\n"
1681 " time_t sem_otime; /* 最後の semop の時刻 */\n"
1682 " time_t sem_ctime; /* 最後に変更が行われた時刻 */\n"
1683 " unsigned short sem_nsems; /* 集合内のセマフォの数 */\n"
1687 #: build/C/man2/semctl.2:99
1689 "The I<ipc_perm> structure is defined in I<E<lt>sys/ipc.hE<gt>> as follows "
1690 "(the highlighted fields are settable using B<IPC_SET>):"
1692 "I<ipc_perm> 構造体は I<E<lt>sys/ipc.hE<gt>> で以下のように定義されている (強"
1693 "調されたフィールドは B<IPC_SET> を使って設定可能である):"
1696 #: build/C/man2/semctl.2:111
1699 "struct ipc_perm {\n"
1700 " key_t __key; /* Key supplied to semget(2) */\n"
1701 " uid_t B<uid>; /* Effective UID of owner */\n"
1702 " gid_t B<gid>; /* Effective GID of owner */\n"
1703 " uid_t cuid; /* Effective UID of creator */\n"
1704 " gid_t cgid; /* Effective GID of creator */\n"
1705 " unsigned short B<mode>; /* Permissions */\n"
1706 " unsigned short __seq; /* Sequence number */\n"
1709 "struct ipc_perm {\n"
1710 " key_t __key; /* semget(2) に与えられるキー */\n"
1711 " uid_t B<uid>; /* 所有者 (owner) の実効 UID */\n"
1712 " gid_t B<gid>; /* 所有者の実効 GID */\n"
1713 " uid_t cuid; /* 作成者 (creator) の実効 UID */\n"
1714 " gid_t cgid; /* 作成者の実効 GID */\n"
1715 " unsigned short B<mode>; /* 許可 */\n"
1716 " unsigned short __seq; /* シーケンス番号 */\n"
1720 #: build/C/man2/semctl.2:117
1721 msgid "Valid values for I<cmd> are:"
1722 msgstr "I<cmd> として有効な値は"
1725 #: build/C/man2/semctl.2:117
1728 msgstr "B<IPC_STAT>"
1731 #: build/C/man2/semctl.2:129
1733 "Copy information from the kernel data structure associated with I<semid> "
1734 "into the I<semid_ds> structure pointed to by I<arg.buf>. The argument "
1735 "I<semnum> is ignored. The calling process must have read permission on the "
1738 "I<semid> に関連づけられたカーネルデータ構造体の情報を I<arg.buf> で指された "
1739 "I<semid_ds> 構造体へコピーする。 I<semnum> 引き数は無視される。 呼び出したプ"
1740 "ロセスはそのセマフォ集合に対する 読み込み許可を持たなければならない。"
1743 #: build/C/man2/semctl.2:129
1749 #: build/C/man2/semctl.2:152
1751 "Write the values of some members of the I<semid_ds> structure pointed to by "
1752 "I<arg.buf> to the kernel data structure associated with this semaphore set, "
1753 "updating also its I<sem_ctime> member. The following members of the "
1754 "structure are updated: I<sem_perm.uid>, I<sem_perm.gid>, and (the least "
1755 "significant 9 bits of) I<sem_perm.mode>. The effective UID of the calling "
1756 "process must match the owner (I<sem_perm.uid>) or creator (I<sem_perm."
1757 "cuid>) of the semaphore set, or the caller must be privileged. The "
1758 "argument I<semnum> is ignored."
1760 "I<arg.buf> で指定された I<semid_ds> 構造体のメンバーのいくつかの値を、 このセ"
1761 "マフォに関連づけられたカーネルデータ構造体に書き込み、 I<sem_ctime> メンバー"
1762 "の値も更新する。 構造体の以下のメンバーが更新される: I<sem_perm.uid>, "
1763 "I<sem_perm.gid>, I<sem_perm.mode> (の最下位 9 ビット)。 呼び出したプロセスの"
1764 "実効 UID が所有者 (I<sem_perm.uid>) または作成者 (I<sem_perm.cuid>) と一致"
1765 "するか、呼び出した人が特権を持たなければならない。 I<semnum> 引き数は無視され"
1769 #: build/C/man2/semctl.2:152
1772 msgstr "B<IPC_RMID>"
1775 #: build/C/man2/semctl.2:167
1777 "Immediately remove the semaphore set, awakening all processes blocked in "
1778 "B<semop>(2) calls on the set (with an error return and I<errno> set to "
1779 "B<EIDRM>). The effective user ID of the calling process must match the "
1780 "creator or owner of the semaphore set, or the caller must be privileged. "
1781 "The argument I<semnum> is ignored."
1783 "セマフォ集合をただちに削除し、その集合上の B<semop>(2) コールでブロックされ"
1784 "ている全てのプロセスを目覚めさせる (エラー値が返されて、 I<errno> に "
1785 "B<EIDRM> が設定される)。 呼び出したプロセスの実効ユーザ ID が そのセマフォ集"
1786 "合の作成者または所有者と一致するか、 呼び出した人が特権を持たなければならな"
1787 "い。 I<semnum> 引き数は無視される。"
1790 #: build/C/man2/semctl.2:167
1792 msgid "B<IPC_INFO> (Linux-specific)"
1793 msgstr "B<IPC_INFO> (Linux 固有)"
1796 #: build/C/man2/semctl.2:179
1798 "Returns information about system-wide semaphore limits and parameters in the "
1799 "structure pointed to by I<arg.__buf>. This structure is of type I<seminfo>, "
1800 "defined in I<E<lt>sys/sem.hE<gt>> if the B<_GNU_SOURCE> feature test macro "
1803 "システム全体でのセマフォの制限とパラメータに関する情報を、 I<arg.__buf> が指"
1804 "す構造体に入れて返す。 この構造体は I<seminfo> 型である。 I<seminfo> は "
1805 "B<_GNU_SOURCE> 機能検査マクロが定義された場合に I<E<lt>sys/sem.hE<gt>> で以下"
1809 #: build/C/man2/semctl.2:201
1812 "struct seminfo {\n"
1813 " int semmap; /* Number of entries in semaphore\n"
1814 " map; unused within kernel */\n"
1815 " int semmni; /* Maximum number of semaphore sets */\n"
1816 " int semmns; /* Maximum number of semaphores in all\n"
1817 " semaphore sets */\n"
1818 " int semmnu; /* System-wide maximum number of undo\n"
1819 " structures; unused within kernel */\n"
1820 " int semmsl; /* Maximum number of semaphores in a\n"
1822 " int semopm; /* Maximum number of operations for\n"
1824 " int semume; /* Maximum number of undo entries per\n"
1825 " process; unused within kernel */\n"
1826 " int semusz; /* Size of struct sem_undo */\n"
1827 " int semvmx; /* Maximum semaphore value */\n"
1828 " int semaem; /* Max. value that can be recorded for\n"
1829 " semaphore adjustment (SEM_UNDO) */\n"
1832 "struct seminfo {\n"
1833 " int semmap; /* セマフォ・マップの最大エントリ数;\n"
1835 " int semmni; /* セマフォ集合の最大数 */\n"
1836 " int semmns; /* 全セマフォ集合中のセマフォの\n"
1838 " int semmnu; /* アンドゥ構造体のシステム全体での\n"
1839 " 最大数; カーネル内では未使用 */\n"
1840 " int semmsl; /* 一つのセマフォ集合の最大セマフォ数 */\n"
1841 " int semopm; /* semop(2) に渡す操作の最大数 */\n"
1842 " int semume; /* プロセスあたりのアンドゥ・エントリ\n"
1843 " の最大数; カーネル内では未使用 */\n"
1844 " int semusz; /* 構造体 sem_undo のサイズ */\n"
1845 " int semvmx; /* セマフォの最大値 */\n"
1846 " int semaem; /* セマフォの調整 (semaphore adjustment;\n"
1847 " SEM_UNDO) のために記録される最大値 */\n"
1851 #: build/C/man2/semctl.2:215
1853 "The I<semmsl>, I<semmns>, I<semopm>, and I<semmni> settings can be changed "
1854 "via I</proc/sys/kernel/sem>; see B<proc>(5) for details."
1856 "設定 I<semmsl>, I<semmns>, I<semopm>, I<semmni> は I</proc/sys/kernel/sem> 経"
1857 "由で変更可能である。 詳しくは B<proc>(5) を参照。"
1860 #: build/C/man2/semctl.2:215
1862 msgid "B<SEM_INFO> (Linux-specific)"
1863 msgstr "B<SEM_INFO> (Linux 固有)"
1866 #: build/C/man2/semctl.2:229
1868 "Returns a I<seminfo> structure containing the same information as for "
1869 "B<IPC_INFO>, except that the following fields are returned with information "
1870 "about system resources consumed by semaphores: the I<semusz> field returns "
1871 "the number of semaphore sets that currently exist on the system; and the "
1872 "I<semaem> field returns the total number of semaphores in all semaphore sets "
1875 "B<IPC_INFO> のときと同じ情報を格納した I<seminfo> 構造体を返す。 但し、以下の"
1876 "フィールドにはセマフォが消費しているシステム資源に 関する情報が格納される点が"
1877 "異なる。 I<semusz> フィールドは現在システム上に存在するセマフォ集合の数を返"
1878 "す。 I<semaem> フィールドはシステム上の全てのセマフォ集合に含まれる セマフォ"
1882 #: build/C/man2/semctl.2:229
1884 msgid "B<SEM_STAT> (Linux-specific)"
1885 msgstr "B<SEM_STAT> (Linux 固有)"
1888 #: build/C/man2/semctl.2:240
1890 "Returns a I<semid_ds> structure as for B<IPC_STAT>. However, the I<semid> "
1891 "argument is not a semaphore identifier, but instead an index into the "
1892 "kernel's internal array that maintains information about all semaphore sets "
1895 "B<IPC_STAT> と同じく I<semid_ds> 構造体を返す。 但し、 I<semid> 引き数は、セ"
1896 "マフォ識別子ではなく、システム上の全てのセマフォ集合 に関する情報を管理する"
1897 "カーネルの内部配列へのインデックスである。"
1900 #: build/C/man2/semctl.2:240
1906 #: build/C/man2/semctl.2:251
1908 "Return B<semval> (i.e., the current value) for all semaphores of the set "
1909 "into I<arg.array>. The argument I<semnum> is ignored. The calling process "
1910 "must have read permission on the semaphore set."
1912 "集合の全てのセマフォの B<semval> の値 (現在の値) を I<arg.array> に返す。 "
1913 "I<semnum> 引き数は無視される。 呼び出したプロセスはそのセマフォ集合に読み込み"
1917 #: build/C/man2/semctl.2:251 build/C/man2/semctl.2:349
1923 #: build/C/man2/semctl.2:264
1925 "The system call returns the value of B<semncnt> for the I<semnum>-th "
1926 "semaphore of the set (i.e., the number of processes waiting for an increase "
1927 "of B<semval> for the I<semnum>-th semaphore of the set). The calling "
1928 "process must have read permission on the semaphore set."
1930 "システムコールは集合の I<semnum> 番目のセマフォの B<semncnt> の値を返す (集合"
1931 "の I<semnum> 番目のセマフォの B<semval> の増加を待っているプロセスの数を返"
1932 "す)。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなければならな"
1936 #: build/C/man2/semctl.2:264 build/C/man2/semctl.2:353
1942 #: build/C/man2/semctl.2:277
1944 "The system call returns the value of B<sempid> for the I<semnum>-th "
1945 "semaphore of the set (i.e., the PID of the process that executed the last "
1946 "B<semop>(2) call 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<sempid> の値 (集合の "
1950 "I<semnum> 番目のセマフォに最後に B<semop>(2) コールを実行したプロセスの "
1951 "PID) を返す。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなけれ"
1955 #: build/C/man2/semctl.2:277 build/C/man2/semctl.2:357
1961 #: build/C/man2/semctl.2:285
1963 "The system call returns the value of B<semval> for the I<semnum>-th "
1964 "semaphore of the set. The calling process must have read permission on the "
1967 "システムコールは集合の I<semnum> 番目のセマフォの B<semval> の値を返す。 呼び"
1968 "出したプロセスはそのセマフォ集合に読み込み許可を持たなければならない。"
1971 #: build/C/man2/semctl.2:285 build/C/man2/semctl.2:361
1977 #: build/C/man2/semctl.2:298
1979 "The system call returns the value of B<semzcnt> for the I<semnum>-th "
1980 "semaphore of the set (i.e., the number of processes waiting for B<semval> of "
1981 "the I<semnum>-th semaphore of the set to become 0). The calling process "
1982 "must have read permission on the semaphore set."
1984 "システムコールは集合の I<semnum> 番目のセマフォの B<semzcnt> の値を返す (集合"
1985 "の I<semnum> 番目のセマフォの B<semval> の値が 0 になるのを待っているプロセス"
1986 "の数を返す)。 呼び出したプロセスはそのセマフォ集合に読み込み許可を持たなけれ"
1990 #: build/C/man2/semctl.2:298
1996 #: build/C/man2/semctl.2:320
1998 "Set B<semval> for all semaphores of the set using I<arg.array>, updating "
1999 "also the I<sem_ctime> member of the I<semid_ds> structure associated with "
2000 "the set. Undo entries (see B<semop>(2)) are cleared for altered semaphores "
2001 "in all processes. If the changes to semaphore values would permit blocked "
2002 "B<semop>(2) calls in other processes to proceed, then those processes are "
2003 "woken up. The argument I<semnum> is ignored. The calling process must have "
2004 "alter (write) permission on the semaphore set."
2006 "集合の全てのセマフォの B<semval> に I<arg.array> で指定された値を設定する。 "
2007 "その集合に関連する I<semid_ds> 構造体の I<sem_ctime> メンバーの値も更新す"
2008 "る。 全てのプロセスのセマフォの変更についてのアンドゥ・エントリ (B<semop>"
2009 "(2) を参照) は消去 (clear) される。 セマフォの値の変更により、他のプロセス内"
2010 "でブロックされている B<semop>(2) コールの続行が許可されると、それらのプロセ"
2011 "スは起こされる (wake up)。 I<semnum> 引き数は無視される。 呼び出したプロセス"
2012 "はそのセマフォ集合に 変更 (書き込み) 許可を持たなければならない。"
2015 #: build/C/man2/semctl.2:320
2021 #: build/C/man2/semctl.2:338
2023 "Set the value of B<semval> to I<arg.val> for the I<semnum>-th semaphore of "
2024 "the set, updating also the I<sem_ctime> member of the I<semid_ds> structure "
2025 "associated with the set. Undo entries are cleared for altered semaphores in "
2026 "all processes. If the changes to semaphore values would permit blocked "
2027 "B<semop>(2) calls in other processes to proceed, then those processes are "
2028 "woken up. The calling process must have alter permission on the semaphore "
2031 "集合の I<semnum> 番目のセマフォの B<semval> に I<arg.val> の値を設定する。そ"
2032 "の集合に関連する I<semid_ds> 構造体の I<sem_ctime> メンバーの値も更新する。 "
2033 "全てのプロセスのセマフォの変更についてのアンドゥ・エントリは消去される。 セマ"
2034 "フォの値の変更により、他のプロセス内でブロックされている B<semop>(2) コール"
2035 "の続行が許可されると、それらのプロセスは起こされる (wake up)。 呼び出したプロ"
2036 "セスはそのセマフォ集合に 変更 (書き込み) 許可を持たなければならない。"
2039 #: build/C/man2/semctl.2:345
2040 msgid "On failure B<semctl>() returns -1 with I<errno> indicating the error."
2042 "失敗した場合、 B<semctl>() は -1 を返し、 I<errno> にそのエラーを示す。"
2045 #: build/C/man2/semctl.2:349
2047 "Otherwise the system call returns a nonnegative value depending on I<cmd> as "
2049 msgstr "そうでなければシステムコールは I<cmd> によって以下の負でない値を返す:"
2052 #: build/C/man2/semctl.2:353
2053 msgid "the value of B<semncnt>."
2054 msgstr "B<semncnt> の値"
2057 #: build/C/man2/semctl.2:357
2058 msgid "the value of B<sempid>."
2059 msgstr "B<sempid> の値"
2062 #: build/C/man2/semctl.2:361
2063 msgid "the value of B<semval>."
2064 msgstr "B<semval> の値"
2067 #: build/C/man2/semctl.2:365
2068 msgid "the value of B<semzcnt>."
2069 msgstr "B<semzcnt> の値"
2072 #: build/C/man2/semctl.2:365
2075 msgstr "B<IPC_INFO>"
2078 #: build/C/man2/semctl.2:373
2080 "the index of the highest used entry in the kernel's internal array recording "
2081 "information about all semaphore sets. (This information can be used with "
2082 "repeated B<SEM_STAT> operations to obtain information about all semaphore "
2083 "sets on the system.)"
2085 "全てのセマフォ集合に関する情報を管理しているカーネルの内部配列の使用中 エント"
2086 "リのインデックスの最大値 (この情報は、システムの全てのセマフォ集合に関する情"
2087 "報を取得するために B<SEM_STAT> 操作を繰り返し実行する際に使用できる)"
2090 #: build/C/man2/semctl.2:373
2093 msgstr "B<SEM_INFO>"
2096 #: build/C/man2/semctl.2:377
2097 msgid "As for B<IPC_INFO>."
2098 msgstr "B<IPC_INFO> と同じ"
2101 #: build/C/man2/semctl.2:377
2104 msgstr "B<SEM_STAT>"
2107 #: build/C/man2/semctl.2:381
2108 msgid "the identifier of the semaphore set whose index was given in I<semid>."
2109 msgstr "I<semid> で指定されたインデックスを持つセマフォ集合の識別子"
2112 #: build/C/man2/semctl.2:385
2113 msgid "All other I<cmd> values return 0 on success."
2114 msgstr "I<cmd> の値がそれ以外の場合、成功すると 0 が返される。"
2117 #: build/C/man2/semctl.2:389
2118 msgid "On failure, I<errno> will be set to one of the following:"
2119 msgstr "失敗した場合は I<errno> には以下の値のどれかが設定される:"
2122 #: build/C/man2/semctl.2:408
2124 "The argument I<cmd> has one of the values B<GETALL>, B<GETPID>, B<GETVAL>, "
2125 "B<GETNCNT>, B<GETZCNT>, B<IPC_STAT>, B<SEM_STAT>, B<SETALL>, or B<SETVAL> "
2126 "and the calling process does not have the required permissions on the "
2127 "semaphore set and does not have the B<CAP_IPC_OWNER> capability."
2129 "I<cmd> 引き数が B<GETALL>, B<GETPID>, B<GETVAL>, B<GETNCNT>, B<GETZCNT>, "
2130 "B<IPC_STAT>, B<SEM_STAT>, B<SETALL>, B<SETVAL> のうちの何れかの値を持ち、 呼"
2131 "び出したプロセスがセマフォに対して必要とされる許可と B<CAP_IPC_OWNER> ケーパ"
2132 "ビリティ (capability) を持っていない。"
2135 #: build/C/man2/semctl.2:408 build/C/man2/semop.2:347
2141 #: build/C/man2/semctl.2:415
2142 msgid "The address pointed to by I<arg.buf> or I<arg.array> isn't accessible."
2144 "I<arg.buf> または I<arg.array> で指されているアドレスにアクセスすることができ"
2148 #: build/C/man2/semctl.2:415 build/C/man2/semop.2:360
2154 #: build/C/man2/semctl.2:418 build/C/man2/semop.2:363
2155 msgid "The semaphore set was removed."
2156 msgstr "セマフォ集合が削除された。"
2159 #: build/C/man2/semctl.2:429
2161 "Invalid value for I<cmd> or I<semid>. Or: for a B<SEM_STAT> operation, the "
2162 "index value specified in I<semid> referred to an array slot that is "
2165 "I<cmd> または I<semid> に無効な値が指定された。 もしくは、 B<SEM_STAT> 操作の"
2166 "場合に、 I<semid> で指定されたインデックス値が現在未使用の配列のスロットを参"
2170 #: build/C/man2/semctl.2:429
2176 #: build/C/man2/semctl.2:447
2178 "The argument I<cmd> has the value B<IPC_SET> or B<IPC_RMID> but the "
2179 "effective user ID of the calling process is not the creator (as found in "
2180 "I<sem_perm.cuid>) or the owner (as found in I<sem_perm.uid>) of the "
2181 "semaphore set, and the process does not have the B<CAP_SYS_ADMIN> capability."
2183 "I<cmd> 引き数に B<IPC_SET> または B<IPC_RMID> が指定され、呼び出したプロセス"
2184 "の実効ユーザ ID がセマフォの (I<sem_perm.cuid> で見つかる) 作成者または "
2185 "(I<sem_perm.uid> で見つかる) 所有者でもなく、 プロセスが B<CAP_SYS_ADMIN> "
2189 #: build/C/man2/semctl.2:447 build/C/man2/semop.2:382
2195 #: build/C/man2/semctl.2:460
2197 "The argument I<cmd> has the value B<SETALL> or B<SETVAL> and the value to "
2198 "which B<semval> is to be set (for some semaphore of the set) is less than 0 "
2199 "or greater than the implementation limit B<SEMVMX>."
2201 "I<cmd> 引き数に B<SETALL> または B<SETVAL> が指定され、(集合のセマフォのどれ"
2202 "かの) B<semval> に設定される値が 0 より小さいか、実装の制限 B<SEMVMX> よりも"
2205 #. SVr4 documents additional error conditions EINVAL, EFBIG, ENOSPC.
2207 #: build/C/man2/semctl.2:463 build/C/man2/semget.2:221
2208 #: build/C/man2/semop.2:400
2209 msgid "SVr4, POSIX.1-2001."
2210 msgstr "SVr4, POSIX.1-2001."
2213 #: build/C/man2/semctl.2:474
2215 "The B<IPC_INFO>, B<SEM_STAT> and B<SEM_INFO> operations are used by the "
2216 "B<ipcs>(1) program to provide information on allocated resources. In the "
2217 "future these may modified or moved to a /proc file system interface."
2219 "B<IPC_INFO>, B<SEM_STAT>, B<SEM_INFO> 操作は B<ipcs>(1) プログラムによって割"
2220 "当られた資源について情報を提供するために使用される。 将来的にはこれらは変更さ"
2221 "れるか、 /proc ファイル・システム・インタフェースに移動されるかもしれない。"
2224 #: build/C/man2/semctl.2:487
2226 "Various fields in a I<struct semid_ds> were typed as I<short> under Linux "
2227 "2.2 and have become I<long> under Linux 2.4. To take advantage of this, a "
2228 "recompilation under glibc-2.1.91 or later should suffice. (The kernel "
2229 "distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
2231 "I<構造体 semid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> 型だった"
2232 "が、Linux 2.4 では I<long> 型になった。 この利点を生かすには、glibc-2.1.91 以"
2233 "降の環境下で 再コンパイルすれば十分である。 カーネルは新しい形式の呼び出しと"
2234 "古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。"
2237 #: build/C/man2/semctl.2:496
2239 "In some earlier versions of glibc, the I<semun> union was defined in "
2240 "I<E<lt>sys/sem.hE<gt>>, but POSIX.1-2001 requires that the caller define "
2241 "this union. On versions of glibc where this union is I<not> defined, the "
2242 "macro B<_SEM_SEMUN_UNDEFINED> is defined in I<E<lt>sys/sem.hE<gt>>."
2244 "初期のバージョンの glibc では、 I<semun> 共用体は I<E<lt>sys/sem.hE<gt>> で定"
2245 "義されていたが、 POSIX.1-2001 では呼び出し側がこの共用体を定義する必要があ"
2246 "る。 この共用体が定義されてI<いない> glibc のバージョンでは、 マクロ "
2247 "B<_SEM_SEMUN_UNDEFINED> が I<E<lt>sys/sem.hE<gt>> で定義されている。"
2250 #: build/C/man2/semctl.2:500
2252 "The following system limit on semaphore sets affects a B<semctl>() call:"
2253 msgstr "以下は B<semctl>() コールに影響するセマフォ集合のシステム制限:"
2256 #: build/C/man2/semctl.2:500 build/C/man2/semop.2:446
2262 #: build/C/man2/semctl.2:505
2263 msgid "Maximum value for B<semval>: implementation dependent (32767)."
2264 msgstr "B<semval> の最大値 : 実装依存 (32767)。"
2267 #: build/C/man2/semctl.2:509
2269 "For greater portability it is best to always call B<semctl>() with four "
2272 "移植性を高めるための一番良い方法は、常に 4 個の引き数で B<semctl>() を呼び出"
2276 #: build/C/man2/semctl.2:515
2278 "B<ipc>(2), B<semget>(2), B<semop>(2), B<capabilities>(7), B<sem_overview>"
2281 "B<ipc>(2), B<semget>(2), B<semop>(2), B<capabilities>(7), B<sem_overview>"
2285 #: build/C/man2/semget.2:34
2291 #: build/C/man2/semget.2:34
2297 #: build/C/man2/semget.2:37
2298 msgid "semget - get a semaphore set identifier"
2299 msgstr "semget - セマフォ集合の識別子を取得する"
2302 #: build/C/man2/semget.2:47
2304 "B<int semget(key_t >I<key>B<,> B<int >I<nsems>B<,> B<int >I<semflg>B<);>"
2306 "B<int semget(key_t >I<key>B<,> B<int >I<nsems>B<,> B<int >I<semflg>B<);>"
2309 #: build/C/man2/semget.2:65
2311 "The B<semget>() system call returns the semaphore set identifier associated "
2312 "with the argument I<key>. A new set of I<nsems> semaphores is created if "
2313 "I<key> has the value B<IPC_PRIVATE> or if no existing semaphore set is "
2314 "associated with I<key> and B<IPC_CREAT> is specified in I<semflg>."
2316 "B<semget>() システムコールは、引き数 I<key> に対応するセマフォ集合 "
2317 "(semaphore set) の 識別子 (identifier) を返す。 I<key> の値が B<IPC_PRIVATE> "
2318 "の場合、もしくは I<semflg> に B<IPC_CREAT> が指定されていて、 I<key> に対応す"
2319 "るセマフォ集合が存在しない場合、 I<nsems> 個のセマフォからなる新しい集合が作"
2323 #: build/C/man2/semget.2:84
2325 "If I<semflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a semaphore set "
2326 "already exists for I<key>, then B<semget>() fails with I<errno> set to "
2327 "B<EEXIST>. (This is analogous to the effect of the combination B<O_CREAT | "
2328 "O_EXCL> for B<open>(2).)"
2330 "I<semflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対"
2331 "応するセマフォ集合が既に存在すると、 B<semget>() は失敗し、 I<errno> に "
2332 "B<EEXIST> が設定される (これは B<open>(2) に B<O_CREAT | O_EXCL> が指定され"
2336 #: build/C/man2/semget.2:97
2338 "Upon creation, the least significant 9 bits of the argument I<semflg> define "
2339 "the permissions (for owner, group and others) for the semaphore set. These "
2340 "bits have the same format, and the same meaning, as the I<mode> argument of "
2341 "B<open>(2) (though the execute permissions are not meaningful for "
2342 "semaphores, and write permissions mean permission to alter semaphore values)."
2344 "セマフォ集合作成時に、引き数 I<semflg> の下位 9 ビットは、そのセマフォ集合の "
2345 "(所有者 (owner)、グループ (group)、 他人 (others) に対する) アクセス許可の定"
2346 "義として使用される。 これらのビットは B<open>(2) の引き数 I<mode> と同じ形式"
2347 "で同じ意味である (但し、実行 (execute) 許可はセマフォでは意味を持たず、 書き"
2348 "込み (write) 許可はセマフォ値の変更 (alter) 許可として機能する)。"
2350 #. In truth, every one of the many implementations that I've tested sets
2351 #. the values to zero, but I suppose there is/was some obscure
2352 #. implementation out there that does not.
2354 #: build/C/man2/semget.2:107
2356 "The values of the semaphores in a newly created set are indeterminate. "
2357 "(POSIX.1-2001 is explicit on this point.) Although Linux, like many other "
2358 "implementations, initializes the semaphore values to 0, a portable "
2359 "application cannot rely on this: it should explicitly initialize the "
2360 "semaphores to the desired values."
2362 "新しく作成されたセマフォ集合の各セマフォの値は不定である (この点は "
2363 "POSIX.1-2001 に明記されている)。 Linux は他の多くの実装と同様にセマフォ値を "
2364 "0 に初期化するが、 移植性を考慮したアプリケーションではこの動作を前提にすべき"
2365 "ではない。 アプリケーションは明示的にセマフォを希望の値で初期化すべきである。"
2368 #: build/C/man2/semget.2:115
2370 "When creating a new semaphore set, B<semget>() initializes the set's "
2371 "associated data structure, I<semid_ds> (see B<semctl>(2)), as follows:"
2373 "新規のセマフォ集合を作成する際、 B<semget>() はセマフォ集合の情報を保持する"
2374 "データ構造体 I<semid_ds> を次のように初期化する (I<semid_ds> については "
2375 "B<semctl>(2) を参照):"
2378 #: build/C/man2/semget.2:120
2380 "I<sem_perm.cuid> and I<sem_perm.uid> are set to the effective user ID of the "
2383 "I<sem_perm.cuid> と I<sem_perm.uid> に、呼び出し元のプロセスの実効 "
2384 "(effective) ユーザ ID を設定する。"
2387 #: build/C/man2/semget.2:125
2389 "I<sem_perm.cgid> and I<sem_perm.gid> are set to the effective group ID of "
2390 "the calling process."
2392 "I<sem_perm.cgid> と I<sem_perm.gid> に、呼び出し元のプロセスの実効 "
2393 "(effective) グループ ID を設定する。"
2396 #: build/C/man2/semget.2:130
2398 "The least significant 9 bits of I<sem_perm.mode> are set to the least "
2399 "significant 9 bits of I<semflg>."
2401 "I<sem_perm.mode> の下位 9 ビットに I<semflg> の下位 9 ビットを設定する。"
2404 #: build/C/man2/semget.2:134
2405 msgid "I<sem_nsems> is set to the value of I<nsems>."
2406 msgstr "I<sem_nsems> に I<nsems> の値を設定する。"
2409 #: build/C/man2/semget.2:137
2410 msgid "I<sem_otime> is set to 0."
2411 msgstr "I<sem_otime> に 0 を設定する。"
2414 #: build/C/man2/semget.2:140
2415 msgid "I<sem_ctime> is set to the current time."
2416 msgstr "I<sem_ctime> に現在の時刻を設定する。"
2419 #: build/C/man2/semget.2:151
2421 "The argument I<nsems> can be 0 (a don't care) when a semaphore set is not "
2422 "being created. Otherwise I<nsems> must be greater than 0 and less than or "
2423 "equal to the maximum number of semaphores per semaphore set (B<SEMMSL>)."
2425 "セマフォ集合の作成を行わない場合は、引き数 I<nsems> に (don't care を意味す"
2426 "る) 0 を指定してもよい。 そうでない場合は、 I<nsems> は 0 より大きい値でなけ"
2427 "ればならず、セマフォ集合あたりのセマフォの最大数 (B<SEMMSL>) 以下でなければ"
2430 #. and a check is made to see if it is marked for destruction.
2432 #: build/C/man2/semget.2:155
2433 msgid "If the semaphore set already exists, the permissions are verified."
2434 msgstr "セマフォ集合が既に存在した場合は、アクセス許可の検査が行われる。"
2437 #: build/C/man2/semget.2:161
2439 "If successful, the return value will be the semaphore set identifier (a "
2440 "nonnegative integer), otherwise -1 is returned, with I<errno> indicating the "
2443 "成功した場合、セマフォ集合の識別子 (非負の整数) が返り値となる。 失敗した場合"
2444 "は -1 が返され、 I<errno> にエラーを示す値が設定される。"
2447 #: build/C/man2/semget.2:165
2448 msgid "On failure I<errno> will be set to one of the following:"
2449 msgstr "失敗した場合、 I<errno> には以下の値のいずれか一つが設定される:"
2452 #: build/C/man2/semget.2:173
2454 "A semaphore set exists for I<key>, but the calling process does not have "
2455 "permission to access the set, and does not have the B<CAP_IPC_OWNER> "
2458 "I<key> に対応するセマフォ集合は存在するが、 呼び出し元のプロセスはその集合へ"
2459 "のアクセス許可がなく、 B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
2463 #. The semaphore set is marked to be deleted.
2465 #: build/C/man2/semget.2:186
2467 "A semaphore set exists for I<key> and I<semflg> specified both B<IPC_CREAT> "
2470 "I<key> に対応するセマフォ集合が存在し、 I<semflg> には B<IPC_CREAT> と "
2471 "B<IPC_EXCL> が指定されていた。"
2474 #: build/C/man2/semget.2:197
2476 "I<nsems> is less than 0 or greater than the limit on the number of "
2477 "semaphores per semaphore set (B<SEMMSL>), or a semaphore set corresponding "
2478 "to I<key> already exists, and I<nsems> is larger than the number of "
2479 "semaphores in that set."
2481 "I<nsems> が 0 より小さいか、セマフォ集合あたりのセマフォの最大数 "
2482 "(B<SEMMSL>) より大きい。 または、 I<key> に対応するセマフォ集合が既に存在"
2483 "し、 I<nsems> がその集合のセマフォ数よりも大きい。"
2486 #: build/C/man2/semget.2:205
2488 "No semaphore set exists for I<key> and I<semflg> did not specify "
2491 "I<key> に対応するセマフォ集合が存在せず、 I<semflg> に B<IPC_CREAT> が指定さ"
2495 #: build/C/man2/semget.2:209
2497 "A semaphore set has to be created but the system does not have enough memory "
2498 "for the new data structure."
2500 "セマフォ集合を作成しようとしたが、新しいデータ構造体を 作成するのに十分なメモ"
2504 #: build/C/man2/semget.2:209
2510 #: build/C/man2/semget.2:217
2512 "A semaphore set has to be created but the system limit for the maximum "
2513 "number of semaphore sets (B<SEMMNI>), or the system wide maximum number of "
2514 "semaphores (B<SEMMNS>), would be exceeded."
2516 "セマフォ集合を作成しようとすると、システムのセマフォ集合の 最大数 "
2517 "(B<SEMMNI>) か、システム全体のセマフォの最大数 (B<SEMMNS>) のいずれかを超え"
2521 #: build/C/man2/semget.2:231
2523 "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type. If this special "
2524 "value is used for I<key>, the system call ignores everything but the least "
2525 "significant 9 bits of I<semflg> and creates a new semaphore set (on success)."
2527 "B<IPC_PRIVATE> はフラグ・フィールドに指定するものではなく、 I<key_t> 型であ"
2528 "る。 この特別な値が I<key> に指定されると、 B<semget>() I<semflg> の下位 9 "
2529 "ビット以外は全て無視し、 (成功した場合は) 新しいセマフォ集合を作成する。"
2532 #: build/C/man2/semget.2:235
2534 "The following limits on semaphore set resources affect the B<semget>() call:"
2536 "セマフォ集合のリソースに関する制限のうち、 B<semget>() に影響を及ぼすものを"
2540 #: build/C/man2/semget.2:235
2545 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
2547 #: build/C/man2/semget.2:241
2549 "System wide maximum number of semaphore sets: policy dependent (on Linux, "
2550 "this limit can be read and modified via the fourth field of I</proc/sys/"
2553 "システム全体のセマフォ集合の最大数: 方針依存 (Linux では、この制限値は I</"
2554 "proc/sys/kernel/sem> の第4フィールドに対応し、読み出しも変更もできる)。"
2557 #: build/C/man2/semget.2:241
2563 #: build/C/man2/semget.2:246
2565 "Maximum number of semaphores per semid: implementation dependent (on Linux, "
2566 "this limit can be read and modified via the first field of I</proc/sys/"
2569 "semid あたりのセマフォの最大数: 実装依存 (Linux では、この制限値は I</proc/"
2570 "sys/kernel/sem> の第1フィールドに対応し、読み出しも変更もできる)。"
2573 #: build/C/man2/semget.2:246
2579 #: build/C/man2/semget.2:254
2581 "System wide maximum number of semaphores: policy dependent (on Linux, this "
2582 "limit can be read and modified via the second field of I</proc/sys/kernel/"
2583 "sem>). Values greater than B<SEMMSL * SEMMNI> makes it irrelevant."
2585 "システム全体のセマフォの最大数: 方針依存 (Linux では、この制限値は I</proc/"
2586 "sys/kernel/sem> の第2フィールドに対応し、読み出しも変更もできる)。 B<SEMMSL "
2587 "* SEMMNI> より大きな値は意味を持たない。"
2590 #: build/C/man2/semget.2:254 build/C/man2/semop.2:458
2596 #: build/C/man2/semget.2:260
2598 "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would "
2599 "more clearly show its function."
2601 "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方が"
2602 "より明確にその機能を表しているだろう。"
2604 #. In fact they are initialized to zero on Linux, but POSIX.1-2001
2605 #. does not specify this, and we can't portably rely on it.
2607 #: build/C/man2/semget.2:279
2609 "The semaphores in a set are not initialized by B<semget>(). In order to "
2610 "initialize the semaphores, B<semctl>(2) must be used to perform a B<SETVAL> "
2611 "or a B<SETALL> operation on the semaphore set. (Where multiple peers do not "
2612 "know who will be the first to initialize the set, checking for a nonzero "
2613 "I<sem_otime> in the associated data structure retrieved by a B<semctl>(2) "
2614 "B<IPC_STAT> operation can be used to avoid races.)"
2616 "セマフォ集合内のセマフォは B<semget>() では初期化されない。 このセマフォを初"
2617 "期化するには、セマフォ集合に対して B<semctl>(2) を使って B<SETVAL> か "
2618 "B<SETALL> 操作を実行する必要がある。 (複数箇所からセマフォ集合の操作が行われ"
2619 "る場面では、 誰が最初に集合を初期化すればよいか分からない。 この状況を避ける"
2620 "には、 B<semctl>(2) の B<IPC_STAT> 操作で取得できるセマフォのデータ構造体の "
2621 "I<sem_otime> が 0 以外になっているかをチェックすればよい。)"
2624 #: build/C/man2/semget.2:285
2626 "B<semctl>(2), B<semop>(2), B<ftok>(3), B<capabilities>(7), B<sem_overview>"
2629 "B<semctl>(2), B<semop>(2), B<ftok>(3), B<capabilities>(7), B<sem_overview>"
2633 #: build/C/man2/semop.2:33
2639 #: build/C/man2/semop.2:33
2645 #: build/C/man2/semop.2:36
2646 msgid "semop, semtimedop - semaphore operations"
2647 msgstr "semop, semtimedop - セマフォの操作"
2650 #: build/C/man2/semop.2:43
2652 msgid "B<int semop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<);>\n"
2653 msgstr "B<int semop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<);>\n"
2656 #: build/C/man2/semop.2:46
2659 "B<int semtimedop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<,>\n"
2660 "B< struct timespec *>I<timeout>B<);>\n"
2662 "B<int semtimedop(int >I<semid>B<, struct sembuf *>I<sops>B<, unsigned >I<nsops>B<,>\n"
2663 "B< struct timespec *>I<timeout>B<);>\n"
2666 #: build/C/man2/semop.2:55
2667 msgid "B<semtimedop>(): _GNU_SOURCE"
2668 msgstr "B<semtimedop>(): _GNU_SOURCE"
2671 #: build/C/man2/semop.2:57
2672 msgid "Each semaphore in a semaphore set has the following associated values:"
2674 "セマフォ集合 (semaphore set) のメンバーの各セマフォは 以下の関連情報を持って"
2678 #: build/C/man2/semop.2:64
2681 "unsigned short semval; /* semaphore value */\n"
2682 "unsigned short semzcnt; /* # waiting for zero */\n"
2683 "unsigned short semncnt; /* # waiting for increase */\n"
2684 "pid_t sempid; /* process that did last op */\n"
2686 "unsigned short semval; /* セマフォ値 */\n"
2687 "unsigned short semzcnt; /* ゼロを待つプロセス数 */\n"
2688 "unsigned short semncnt; /* 増加を待つプロセス数 */\n"
2689 "pid_t sempid; /* 最後に操作を行なったプロセス */\n"
2692 #: build/C/man2/semop.2:78
2694 "B<semop>() performs operations on selected semaphores in the set indicated "
2695 "by I<semid>. Each of the I<nsops> elements in the array pointed to by "
2696 "I<sops> specifies an operation to be performed on a single semaphore. The "
2697 "elements of this structure are of type I<struct sembuf>, containing the "
2698 "following members:"
2700 "B<semop>() は I<semid> で指定されたセマフォ集合の選択されたセマフォに対して"
2701 "操作を行う。 I<sops> は I<nsops> 個の要素の配列を指し、配列の各要素は個々のセ"
2702 "マフォに 対する操作を示す。その型は I<struct sembuf> で、次のメンバを持つ:"
2705 #: build/C/man2/semop.2:84
2708 "unsigned short sem_num; /* semaphore number */\n"
2709 "short sem_op; /* semaphore operation */\n"
2710 "short sem_flg; /* operation flags */\n"
2712 "unsigned short sem_num; /* セマフォ番号 */\n"
2713 "short sem_op; /* セマフォ操作 */\n"
2714 "short sem_flg; /* 操作フラグ */\n"
2717 #: build/C/man2/semop.2:96
2719 "Flags recognized in I<sem_flg> are B<IPC_NOWAIT> and B<SEM_UNDO>. If an "
2720 "operation specifies B<SEM_UNDO>, it will be automatically undone when the "
2721 "process terminates."
2723 "I<sem_flg> には B<IPC_NOWAIT> と B<SEM_UNDO> が設定できる。 B<SEM_UNDO> が指"
2724 "定された操作は、そのプロセスが終了した時に自動的に取り消される。"
2727 #: build/C/man2/semop.2:111
2729 "The set of operations contained in I<sops> is performed in I<array order>, "
2730 "and I<atomically>, that is, the operations are performed either as a "
2731 "complete unit, or not at all. The behavior of the system call if not all "
2732 "operations can be performed immediately depends on the presence of the "
2733 "B<IPC_NOWAIT> flag in the individual I<sem_flg> fields, as noted below."
2735 "I<sops> に含まれる操作の集合は、 I<配列の順序> で、 I<アトミックに> 実行され"
2736 "る。 すなわち、全ての操作が完全に実行されるか、全く実行されないかの どちらか"
2737 "となる。 全ての操作が直ちに実行できない場合のこのシステムコールの振る舞いは "
2738 "個々の操作の I<sem_flg> フィールドに B<IPC_NOWAIT> が存在するかによって決ま"
2742 #: build/C/man2/semop.2:118
2744 "Each operation is performed on the I<sem_num>-th semaphore of the semaphore "
2745 "set, where the first semaphore of the set is numbered 0. There are three "
2746 "types of operation, distinguished by the value of I<sem_op>."
2748 "それぞれの操作はセマフォ集合の I<sem_num>番目 のセマフォに対して実行される。"
2749 "セマフォ集合の最初のセマフォには 番号 0 が振られる。 そして操作は三種類あ"
2750 "り、 I<sem_op> の値で区別される。"
2753 #: build/C/man2/semop.2:131
2755 "If I<sem_op> is a positive integer, the operation adds this value to the "
2756 "semaphore value (I<semval>). Furthermore, if B<SEM_UNDO> is specified for "
2757 "this operation, the system updates the process undo count (I<semadj>) for "
2758 "this semaphore. This operation can always proceed\\(emit never forces a "
2759 "process to wait. The calling process must have alter permission on the "
2762 "I<sem_op> が正の整数の場合、操作としてその値をセマフォの値 (I<semval>) に加"
2763 "える。さらにこの操作に B<SEM_UNDO> が指定されている場合は、システムはこのセマ"
2764 "フォの プロセス・アンドゥ数 (I<semadj>) を更新する。 この操作は必ず実行で"
2765 "き、プロセスの停止は起こらない。 呼び出し元プロセスは対象のセマフォ集合を変更"
2769 #: build/C/man2/semop.2:156
2771 "If I<sem_op> is zero, the process must have read permission on the semaphore "
2772 "set. This is a \"wait-for-zero\" operation: if I<semval> is zero, the "
2773 "operation can immediately proceed. Otherwise, if B<IPC_NOWAIT> is specified "
2774 "in I<sem_flg>, B<semop>() fails with I<errno> set to B<EAGAIN> (and none of "
2775 "the operations in I<sops> is performed). Otherwise I<semzcnt> (the count of "
2776 "processes waiting until this semaphore's value becomes zero) is incremented "
2777 "by one and the process sleeps until one of the following occurs:"
2779 "I<sem_op> が 0 の場合、「ゼロまで待つ」操作である。この場合、プロセスは その"
2780 "セマフォ集合に対する読み込み許可がなければならない。 I<semval> が 0 ならば、"
2781 "操作は直ちに行われる。 I<semval> が 0 でない場合、 I<sem_flg> に "
2782 "B<IPC_NOWAIT> が指定されていれば、 B<semop>() は失敗し、 B<errno> に "
2783 "B<EAGAIN> が設定される (このとき I<sops> に対する操作は全く実行されない)。 "
2784 "I<sem_flg> に B<IPC_NOWAIT> が指定されていない場合、 I<semzcnt> (セマフォ値"
2785 "が 0 になるのを待っているプロセスの数) を 1 増加させて、 以下のいずれかが起こ"
2786 "るまでプロセスを停止 (sleep) する。"
2789 #: build/C/man2/semop.2:156 build/C/man2/semop.2:161 build/C/man2/semop.2:169
2790 #: build/C/man2/semop.2:179 build/C/man2/semop.2:230 build/C/man2/semop.2:245
2791 #: build/C/man2/semop.2:252 build/C/man2/semop.2:262
2797 #: build/C/man2/semop.2:161
2799 "I<semval> becomes 0, at which time the value of I<semzcnt> is decremented."
2800 msgstr "I<semval> が 0 になった: このとき I<semzcnt> の値は 1 減算される。"
2803 #: build/C/man2/semop.2:169
2805 "The semaphore set is removed: B<semop>() fails, with I<errno> set to "
2808 "セマフォ集合が削除された: このとき B<semop>() は失敗し、 I<errno> に "
2812 #: build/C/man2/semop.2:179
2814 "The calling process catches a signal: the value of I<semzcnt> is decremented "
2815 "and B<semop>() fails, with I<errno> set to B<EINTR>."
2817 "呼び出し元プロセスがシグナルを捕獲した: このとき I<semzcnt> の値は 1 減算さ"
2818 "れ、 B<semop>() は失敗し I<errno> に B<EINTR> が設定される。"
2821 #: build/C/man2/semop.2:190
2823 "The time limit specified by I<timeout> in a B<semtimedop>() call expires: "
2824 "B<semop>() fails, with I<errno> set to B<EAGAIN>."
2826 "B<semtimedop>() の I<timeout> で指定された制限時間が経過した: このとき "
2827 "B<semtimedop>() は失敗し、 I<errno> に B<EAGAIN> が設定される。"
2830 #: build/C/man2/semop.2:230
2832 "If I<sem_op> is less than zero, the process must have alter permission on "
2833 "the semaphore set. If I<semval> is greater than or equal to the absolute "
2834 "value of I<sem_op>, the operation can proceed immediately: the absolute "
2835 "value of I<sem_op> is subtracted from I<semval>, and, if B<SEM_UNDO> is "
2836 "specified for this operation, the system updates the process undo count "
2837 "(I<semadj>) for this semaphore. If the absolute value of I<sem_op> is "
2838 "greater than I<semval>, and B<IPC_NOWAIT> is specified in I<sem_flg>, "
2839 "B<semop>() fails, with I<errno> set to B<EAGAIN> (and none of the "
2840 "operations in I<sops> is performed). Otherwise I<semncnt> (the counter of "
2841 "processes waiting for this semaphore's value to increase) is incremented by "
2842 "one and the process sleeps until one of the following occurs:"
2844 "I<sem_op> が 0 未満の場合、プロセスにはそのセマフォ集合を変更する許可がなけれ"
2845 "ば ならない。 I<semval> が I<sem_op> の絶対値以上の場合は、操作は直ちに実行さ"
2846 "れる: I<semval> から I<sem_op> の絶対値が減算される。 さらに、この操作に "
2847 "B<SEM_UNDO> が指定されている場合は、このセマフォのプロセス・アンドゥ数 "
2848 "(I<semadj>) を更新する。 I<semval> が I<sem_op> の絶対値より小さく、 "
2849 "I<sem_flg> に B<IPC_NOWAIT> が指定された場合は、 B<semop>() は失敗し、 "
2850 "I<errno> に B<EAGAIN> が設定される (このとき I<sops> の操作は全く実行されな"
2851 "い)。 B<IPC_WAIT> が指定されていなければ、 I<semncnt> (このセマフォの値が増加"
2852 "するのを待っているプロセス数のカウンタ) を 1 増加させて、以下のいずれかが起"
2853 "こるまでプロセスを停止 (sleep) する。"
2856 #: build/C/man2/semop.2:245
2858 "I<semval> becomes greater than or equal to the absolute value of I<sem_op>, "
2859 "at which time the value of I<semncnt> is decremented, the absolute value of "
2860 "I<sem_op> is subtracted from I<semval> and, if B<SEM_UNDO> is specified for "
2861 "this operation, the system updates the process undo count (I<semadj>) for "
2864 "I<semval> が I<sem_op> の絶対値以上になった: このとき I<semncnt> が 1 減算さ"
2865 "れ、 I<semval> から I<sem_op> の絶対値が引かれる。 この操作に B<SEM_UNDO> が"
2866 "指定されていた場合にはこのセマフォのプロセス・アンドゥ数 (I<semadj>) も更新"
2870 #: build/C/man2/semop.2:252
2872 "The semaphore set is removed from the system: B<semop>() fails, with "
2873 "I<errno> set to B<EIDRM>."
2875 "セマフォ集合がシステムから削除された: このとき B<semop>() は失敗し I<errno> "
2876 "に B<EIDRM> が設定される。"
2879 #: build/C/man2/semop.2:262
2881 "The calling process catches a signal: the value of I<semncnt> is decremented "
2882 "and B<semop>() fails, with I<errno> set to B<EINTR>."
2884 "呼び出したプロセスがシグナルを捕獲した: このとき I<semncnt> が 1 減算され、 "
2885 "B<semop>() は失敗し I<errno> に B<EINTR> が設定される。"
2888 #: build/C/man2/semop.2:271
2890 "The time limit specified by I<timeout> in a B<semtimedop>() call expires: "
2891 "the system call fails, with I<errno> set to B<EAGAIN>."
2893 "B<semtimedop>() の I<timeout> で指定された制限時間が経過した: このとき "
2894 "B<semtimedop>() は失敗し、 I<errno> に B<EAGAIN> が設定される。"
2899 #: build/C/man2/semop.2:282
2901 "On successful completion, the I<sempid> value for each semaphore specified "
2902 "in the array pointed to by I<sops> is set to the process ID of the calling "
2903 "process. In addition, the I<sem_otime> is set to the current time."
2905 "操作が成功した場合、 I<sops> が指す配列によって操作対象となった各セマフォの "
2906 "I<sempid> メンバーには呼び出したプロセスのプロセス ID が設定される。 さらに "
2907 "I<sem_otime> に現在時刻が設定される。"
2910 #: build/C/man2/semop.2:309
2912 "B<semtimedop>() behaves identically to B<semop>() except that in those "
2913 "cases were the calling process would sleep, the duration of that sleep is "
2914 "limited by the amount of elapsed time specified by the I<timespec> structure "
2915 "whose address is passed in the I<timeout> argument. If the specified time "
2916 "limit has been reached, B<semtimedop>() fails with I<errno> set to "
2917 "B<EAGAIN> (and none of the operations in I<sops> is performed). If the "
2918 "I<timeout> argument is NULL, then B<semtimedop>() behaves exactly like "
2921 "B<semtimedop>() 関数の振る舞いは B<semop>() と全く同じだが、 呼び出し元プロ"
2922 "セスが停止する場合、停止期間の上限が I<timeout> 引き数の指す I<timespec> 構造"
2923 "体で指定された時間となる点だけが異なる。 指定した制限時間に達した場合は、 "
2924 "B<semtimedop>() は失敗し、 I<errno> に B<EAGAIN> が設定される (このとき "
2925 "I<sops> の操作は実行されない)。 I<timeout> 引き数が NULL の場合、 "
2926 "B<semtimedop>() 関数の振る舞いは B<semop>() 関数と全く同じになる。"
2929 #: build/C/man2/semop.2:319
2931 "If successful B<semop>() and B<semtimedop>() return 0; otherwise they "
2932 "return -1 with I<errno> indicating the error."
2934 "成功した場合、 B<semop>() と B<semtimedop>() は 0 を返す。そうでなければ "
2935 "-1 を返し、 エラーを示す I<errno> を設定する。"
2938 #: build/C/man2/semop.2:323
2939 msgid "On failure, I<errno> is set to one of the following:"
2940 msgstr "失敗した場合、 I<errno> に以下のどれかが設定される:"
2943 #: build/C/man2/semop.2:323
2949 #: build/C/man2/semop.2:331
2951 "The argument I<nsops> is greater than B<SEMOPM>, the maximum number of "
2952 "operations allowed per system call."
2954 "I<nsops> 引き数が B<SEMOPM> より大きい。 B<SEMOPM> は一回のシステムコールで許"
2958 #: build/C/man2/semop.2:338
2960 "The calling process does not have the permissions required to perform the "
2961 "specified semaphore operations, and does not have the B<CAP_IPC_OWNER> "
2964 "呼び出し元プロセスには指定されたセマフォ操作を行うのに 必要なアクセス許可がな"
2965 "く、 B<CAP_IPC_OWNER> ケーパビリティもない。"
2968 #: build/C/man2/semop.2:347
2970 "An operation could not proceed immediately and either B<IPC_NOWAIT> was "
2971 "specified in I<sem_flg> or the time limit specified in I<timeout> expired."
2973 "操作を直ちに処理することができず、かつ I<sem_flg> に B<IPC_NOWAIT> が指定され"
2974 "ているか I<timeout> で指定された制限時間が経過した。"
2977 #: build/C/man2/semop.2:354
2979 "An address specified in either the I<sops> or the I<timeout> argument isn't "
2981 msgstr "引き数 I<sops> か I<timeout> が指しているアドレスにアクセスできない。"
2984 #: build/C/man2/semop.2:354
2990 #: build/C/man2/semop.2:360
2992 "For some operation the value of I<sem_num> is less than 0 or greater than or "
2993 "equal to the number of semaphores in the set."
2995 "ある操作で、 I<sem_num> の値が 0 未満か、集合内のセマフォの数以上である。"
2998 #: build/C/man2/semop.2:367
3000 "While blocked in this system call, the process caught a signal; see B<signal>"
3003 "このシステムコールで停止している時にプロセスがシグナルを捕獲した。 B<single>"
3007 #: build/C/man2/semop.2:374
3009 "The semaphore set doesn't exist, or I<semid> is less than zero, or I<nsops> "
3010 "has a nonpositive value."
3012 "セマフォ集合が存在しないか、 I<semid> が 0 未満であるか、 I<nsops> が正の数で"
3016 #: build/C/man2/semop.2:382
3018 "The I<sem_flg> of some operation specified B<SEM_UNDO> and the system does "
3019 "not have enough memory to allocate the undo structure."
3021 "ある操作で I<sem_flg> に B<SEM_UNDO> が指定されたが、システムにアンドゥ構造体"
3025 #: build/C/man2/semop.2:390
3027 "For some operation I<sem_op+semval> is greater than B<SEMVMX>, the "
3028 "implementation dependent maximum value for I<semval>."
3030 "ある操作で I<sem_op+semval> が B<SEMVMX> より大きい。 B<SEMVMX> は I<semval> "
3031 "の最大値で、その値は実装依存である。"
3034 #: build/C/man2/semop.2:390
3040 #: build/C/man2/semop.2:397
3042 "B<semtimedop>() first appeared in Linux 2.5.52, and was subsequently "
3043 "backported into kernel 2.4.22. Glibc support for B<semtimedop>() first "
3044 "appeared in version 2.3.3."
3046 "B<semtimedop>() は Linux 2.5.52 で初めて登場し、 それからカーネル 2.4.22 に"
3047 "も移植された。 B<semtimedop>() の glibc でのサポートはバージョン 2.3.3 で初"
3051 #: build/C/man2/semop.2:408
3053 "The I<sem_undo> structures of a process aren't inherited by the child "
3054 "produced by B<fork>(2), but they are inherited across an B<execve>(2) "
3057 "あるプロセスの I<sem_undo> 構造体は B<fork>(2) で生成された子プロセスには継"
3058 "承されないが、 B<execve>(2) システムコールの場合は継承される。"
3061 #: build/C/man2/semop.2:414
3063 "B<semop>() is never automatically restarted after being interrupted by a "
3064 "signal handler, regardless of the setting of the B<SA_RESTART> flag when "
3065 "establishing a signal handler."
3067 "B<semop>() はシグナルハンドラによって中断された後に、 決して自動的に再開する"
3068 "ことはない。 たとえシグナルハンドラの設定時に B<SA_RESTART> フラグがセットさ"
3072 #: build/C/man2/semop.2:429
3074 "I<semadj> is a per-process integer which is simply the (negative) count of "
3075 "all semaphore operations performed specifying the B<SEM_UNDO> flag. When a "
3076 "semaphore's value is directly set using the B<SETVAL> or B<SETALL> request "
3077 "to B<semctl>(2), the corresponding I<semadj> values in all processes are "
3080 "I<semadj> はプロセスごとの整数で、 B<SEM_UNDO> フラグを設定して実行された全て"
3081 "のセマフォ操作の(負数の)カウンタである。 B<semctl>(2) に B<SETVAL> または "
3082 "B<SETALL> を指定し、セマフォの値が 直接設定された場合には、全てのプロセスにお"
3083 "いて対応する I<semadj> の値がクリアされる。"
3086 #: build/C/man2/semop.2:434
3088 "The I<semval>, I<sempid>, I<semzcnt>, and I<semnct> values for a semaphore "
3089 "can all be retrieved using appropriate B<semctl>(2) calls."
3091 "あるセマフォの I<semval>, I<sempid>, I<semzcnt>, I<semnct> の値はいずれも、適"
3092 "切な操作を指定して B<semctl>(2) を呼び出すことで取得できる。"
3095 #: build/C/man2/semop.2:438
3097 "The following limits on semaphore set resources affect the B<semop>() call:"
3099 "セマフォ集合のリソースに関する制限のうち、 B<semop>() に影響を及ぼすものを以"
3103 #: build/C/man2/semop.2:438
3108 #. This /proc file is not available in Linux 2.2 and earlier -- MTK
3110 #: build/C/man2/semop.2:446
3112 "Maximum number of operations allowed for one B<semop>() call (32) (on "
3113 "Linux, this limit can be read and modified via the third field of I</proc/"
3116 "一回の B<semop>() で許される操作の最大数 (32)。 (Linux では、この制限値は "
3117 "I</proc/sys/kernel/sem> の第3フィールドに対応し、読み出しも変更もできる)。"
3120 #: build/C/man2/semop.2:451
3122 "Maximum allowable value for I<semval>: implementation dependent (32767)."
3123 msgstr "I<semval> が取り得る最大値: 実装依存 (32767)。"
3126 #: build/C/man2/semop.2:458
3128 "The implementation has no intrinsic limits for the adjust on exit maximum "
3129 "value (B<SEMAEM>), the system wide maximum number of undo structures "
3130 "(B<SEMMNU>) and the per-process maximum number of undo entries system "
3133 "以下の値に関しては実装依存の制限はない。 終了時の調整 (adjust on exit) の最大"
3134 "値 (B<SEMAEM>)、 システム全体のアンドゥ構造体の最大数 (B<SEMMNU>)、 プロセス"
3138 #: build/C/man2/semop.2:479
3140 "When a process terminates, its set of associated I<semadj> structures is "
3141 "used to undo the effect of all of the semaphore operations it performed with "
3142 "the B<SEM_UNDO> flag. This raises a difficulty: if one (or more) of these "
3143 "semaphore adjustments would result in an attempt to decrease a semaphore's "
3144 "value below zero, what should an implementation do? One possible approach "
3145 "would be to block until all the semaphore adjustments could be performed. "
3146 "This is however undesirable since it could force process termination to "
3147 "block for arbitrarily long periods. Another possibility is that such "
3148 "semaphore adjustments could be ignored altogether (somewhat analogously to "
3149 "failing when B<IPC_NOWAIT> is specified for a semaphore operation). Linux "
3150 "adopts a third approach: decreasing the semaphore value as far as possible "
3151 "(i.e., to zero) and allowing process termination to proceed immediately."
3153 "プロセスが終了する際、プロセスに対応する I<semadj> の集合を使って、 "
3154 "B<SEM_UNDO> フラグ付きで実行された全てのセマフォ操作の影響を取り消す。 これに"
3155 "よりある問題が発生する: これらのセマフォの調整を行っていると、 中にはセマフォ"
3156 "の値が 0 未満の値にしようとする場合が出てくる。 このような場合、どのように実"
3157 "装するべきか? ひとつの考えられる手法は、全てのセマフォ調整が実行されるまで 停"
3158 "止することである。しかし、この方法ではプロセスの終了が 長時間にわたって停止さ"
3159 "れることがあるので望ましくない。 しかもどれくらい長時間になるかは分からな"
3160 "い。 別の選択肢として、このようなセマフォ調整を完全に無視してしまう方法があ"
3161 "る (これはセマフォ操作として B<IPC_NOWAIT> が指定するのと少し似ている)。 "
3162 "Linux は第三の手法を採用している: セマフォの値を出来るだけ (つまり 0 まで) 減"
3163 "少させて、プロセスの終了を直ちに続行できるようにしている。"
3166 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=110260821123863&w=2
3168 #. http://marc.theaimsgroup.com/?l=linux-kernel&m=110261701025794&w=2
3170 #: build/C/man2/semop.2:488
3172 "In kernels 2.6.x, x E<lt>= 10, there is a bug that in some circumstances "
3173 "prevents a process that is waiting for a semaphore value to become zero from "
3174 "being woken up when the value does actually become zero. This bug is fixed "
3177 "カーネル 2.6.x (x E<lt>= 10) には、ある状況においてセマフォ値が 0 になるのを "
3178 "待っているプロセスが、セマフォ値が実際に 0 になったときに起床 (wake up) され"
3179 "ない、というバグがある。このバグはカーネル 2.6.11 で修正されている。"
3182 #: build/C/man2/semop.2:493
3184 "The following code segment uses B<semop>() to atomically wait for the value "
3185 "of semaphore 0 to become zero, and then increment the semaphore value by one."
3187 "以下の部分的なコードは、 セマフォ 0 の値が 0 になるのを待ってから、 セマフォ"
3188 "の値を 1 加算する処理を、 B<semop>() を使ってアトミック (atomically) に行"
3192 #: build/C/man2/semop.2:497
3195 " struct sembuf sops[2];\n"
3198 " struct sembuf sops[2];\n"
3202 #: build/C/man2/semop.2:499
3204 msgid " /* Code to set I<semid> omitted */\n"
3205 msgstr " /* Code to set I<semid> omitted */\n"
3208 #: build/C/man2/semop.2:503
3211 " sops[0].sem_num = 0; /* Operate on semaphore 0 */\n"
3212 " sops[0].sem_op = 0; /* Wait for value to equal 0 */\n"
3213 " sops[0].sem_flg = 0;\n"
3215 " sops[0].sem_num = 0; /* Operate on semaphore 0 */\n"
3216 " sops[0].sem_op = 0; /* Wait for value to equal 0 */\n"
3217 " sops[0].sem_flg = 0;\n"
3220 #: build/C/man2/semop.2:507
3223 " sops[1].sem_num = 0; /* Operate on semaphore 0 */\n"
3224 " sops[1].sem_op = 1; /* Increment value by one */\n"
3225 " sops[1].sem_flg = 0;\n"
3227 " sops[1].sem_num = 0; /* Operate on semaphore 0 */\n"
3228 " sops[1].sem_op = 1; /* Increment value by one */\n"
3229 " sops[1].sem_flg = 0;\n"
3232 #: build/C/man2/semop.2:512
3235 " if (semop(semid, sops, 2) == -1) {\n"
3236 " perror(\"semop\");\n"
3237 " exit(EXIT_FAILURE);\n"
3240 " if (semop(semid, sops, 2) == -1) {\n"
3241 " perror(\"semop\");\n"
3242 " exit(EXIT_FAILURE);\n"
3246 #: build/C/man2/semop.2:520
3248 "B<semctl>(2), B<semget>(2), B<sigaction>(2), B<capabilities>(7), "
3249 "B<sem_overview>(7), B<svipc>(7), B<time>(7)"
3251 "B<semctl>(2), B<semget>(2), B<sigaction>(2), B<capabilities>(7), "
3252 "B<sem_overview>(7), B<svipc>(7), B<time>(7)"
3255 #~ msgstr "この文書について"
3258 #~ "This page is part of release 3.38 of the Linux I<man-pages> project. A "
3259 #~ "description of the project, and information about reporting bugs, can be "
3260 #~ "found at http://www.kernel.org/doc/man-pages/."
3262 #~ "この man ページは Linux I<man-pages> プロジェクトのリリース 3.38 の一部で"
3264 #~ "プロジェクトの説明とバグ報告に関する情報は\n"
3265 #~ "http://www.kernel.org/doc/man-pages/ に書かれている。"