OSDN Git Service

Update draft based on LDP v3.75 po4a files
[linuxjm/LDP_man-pages.git] / draft / man2 / epoll_ctl.2
index e8226f8..6e03e54 100644 (file)
@@ -32,7 +32,7 @@
 .\" Updated 2006-07-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
 .\" Updated 2009-02-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.19
 .\"
-.TH EPOLL_CTL 2 2012\-04\-15 Linux "Linux Programmer's Manual"
+.TH EPOLL_CTL 2 2014\-07\-08 Linux "Linux Programmer's Manual"
 .SH 名前
 epoll_ctl \- epoll ディスクリプタのインタフェースを操作する
 .SH 書式
@@ -111,6 +111,18 @@ distribution architectures) についての詳細な情報は、 \fBepoll\fP(7)
 インタフェースによってイベントが報告されなくなることを意味する。 新しいイベントマスクでファイルディスクリプタを再度有効にするためには、
 \fBepoll_ctl\fP()  に \fBEPOLL_CTL_MOD\fP を指定して呼び出さなければならない。 \fIop\fP
 引き数に指定できる有効な値は、以下の通り:
+.TP 
+\fBEPOLLWAKEUP\fP (Linux 3.5 以降)
+.\" commit 4d7e30d98939a0340022ccd49325a3d70f7e0238
+If \fBEPOLLONESHOT\fP and \fBEPOLLET\fP are clear and the process has the
+\fBCAP_BLOCK_SUSPEND\fP capability, ensure that the system does not enter
+"suspend" or "hibernate" while this event is pending or being processed.
+The event is considered as being "processed" from the time when it is
+returned by a call to \fBepoll_wait\fP(2)  until the next call to
+\fBepoll_wait\fP(2)  on the same \fBepoll\fP(7)  file descriptor, the closure of
+that file descriptor, the removal of the event file descriptor with
+\fBEPOLL_CTL_DEL\fP, or the clearing of \fBEPOLLWAKEUP\fP for the event file
+descriptor with \fBEPOLL_CTL_MOD\fP.  See also BUGS.
 .SH 返り値
 成功した場合、 \fBepoll_ctl\fP()  は 0 を返す。 エラーが起こった場合、 \fBepoll_ctl\fP()  は \-1 を返し、
 \fIerrno\fP を適切に設定する。
@@ -154,9 +166,22 @@ Linux 2.6.9 より前では、 \fBEPOLL_CTL_DEL\fP 操作の際、引き数 \fIe
 NULL でないポインタを渡す必要があった。 カーネル 2.6.9 以降では、 \fBEPOLL_CTL_DEL\fP を使う際に \fIevent\fP に
 NULL を指定できるようになっている。 2.6.9 より前のカーネルへの移植性が必要なアプリケーションでは、 \fIevent\fP に NULL
 でないポインタを指定すべきである。
+
+.\" commit a8159414d7e3af7233e7a5a82d1c5d85379bd75c (behavior change)
+.\" https://lwn.net/Articles/520198/
+If \fBEPOLLWAKEUP\fP is specified in \fIflags\fP, but the caller does not have the
+\fBCAP_BLOCK_SUSPEND\fP capability, then the \fBEPOLLWAKEUP\fP flag is \fIsilently
+ignored\fP.  This unfortunate behavior is necessary because no validity checks
+were performed on the \fIflags\fP argument in the original implementation, and
+the addition of the \fBEPOLLWAKEUP\fP with a check that caused the call to fail
+if the caller did not have the \fBCAP_BLOCK_SUSPEND\fP capability caused a
+breakage in at least one existing user\-space application that happened to
+randomly (and uselessly) specify this bit.  A robust application should
+therefore double check that it has the \fBCAP_BLOCK_SUSPEND\fP capability if
+attempting to use the \fBEPOLLWAKEUP\fP flag.
 .SH 関連項目
 \fBepoll_create\fP(2), \fBepoll_wait\fP(2), \fBpoll\fP(2), \fBepoll\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.68 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.75 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。