[108] in Pthreads mailing list archive
Re: Patches for pthreads-1.60 beta3
daemon@ATHENA.MIT.EDU (NIIBE Yutaka)
Wed Sep 6 00:40:23 1995
Date: Wed, 6 Sep 1995 13:24:04 +0900
From: NIIBE Yutaka <gniibe@mri.co.jp>
To: Greg Hudson <ghudson@MIT.EDU>
Cc: pthreads@MIT.EDU
In-Reply-To: <199509060348.XAA05325@glacier.MIT.EDU>
Greg Hudson writes:
> The pthread library should not assume that __FD_NONBLOCK is unset in
> fd_table[fd]->flags, since the user might request non-blocking I/O.
> Can you explain where you found an assumption in the library that
> __FD_NONBLCOK is unset in fd_table[fd]->flags?
What I think is:
The pthread library always sets __FD_NONBLOCK on the file descripters,
as it should not block on I/O requesto for pipe/socket/tty.
However, it unsets __FD_NONBLOCK in fd_table[fd]->flags.
I guess that the reason is:
as it is implementation issue, it is
better that it isn't seen from user's view.
The users might request non-blocking I/O, this is redundant.
For example, the file descripter is SETFL-ed with __FD_NONBLOCK, but
corresponding fd_table[fd]->flags is not set in open(), pipe(),
socket() in fd_kern.c.
Am I wrong?
--
NIIBE Yutaka