悪いことに glibc 2.0 以前では \fBpselect\fP() のプロトタイプが間違っている。 glibc 2.1 から 2.2.1 では
\fB_GNU_SOURCE\fP が定義されている場合に、 \fBpselect\fP() が提供される。 glibc 2.2.2 以降では、
\fBpselect\fP() を使用するには、「書式」に記載された要件を満たす必要がある。
-.SS "Multithreaded applications"
-If a file descriptor being monitored by \fBselect\fP() is closed in another
-thread, the result is unspecified. On some UNIX systems, \fBselect\fP()
-unblocks and returns, with an indication that the file descriptor is ready
-(a subsequent I/O operation will likely fail with an error, unless another
-the file descriptor reopened between the time \fBselect\fP() returned and the
-I/O operations was performed). On Linux (and some other systems), closing
-the file descriptor in another thread has no effect on \fBselect\fP(). In
-summary, any application that relies on a particular behavior in this
-scenario must be considered buggy.
+.SS マルチスレッド・アプリケーション
+\fBselect\fP() で監視中のファイルディスクリプタが別のスレッドでクローズされた場合、どのような結果になるかは規定されていない。いくつかの
+UNIX システムでは、 \fBselect\fP() は停止 (block) せず、すぐ返り、ファイルディスクリプタが ready だと報告される
+(\fBselect\fP() が返ってから I/O 操作が実行されるまでの間に、 別のファイルディスクリプタが再度オープンされない限り、 それ以降の I/O
+操作はおそらく失敗するだろう)。 Linux (や他のいくつかのシステム) では、 別のスレッドでファイルディスクリプタがクローズされても
+\fBselect\fP() には影響を与えない。
+まとめると、このような場合に特定の動作に依存しているアプリケーションは「バグっている」と考えなければならない。
.SS "Linux での注意"
このページで説明している \fBpselect\fP() のインターフェースは、glibc に
実装されているものである。内部で呼び出される Linux のシステムコールは
考察と使用例の書かれたチュートリアルとして、 \fBselect_tut\fP(2) がある。
.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。