[110] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: Patches for pthreads-1.60 beta3

daemon@ATHENA.MIT.EDU (NIIBE Yutaka)
Wed Sep 6 00:57:50 1995

Date: Wed, 6 Sep 1995 13:37:35 +0900
From: NIIBE Yutaka <gniibe@mri.co.jp>
To: Greg Hudson <ghudson@MIT.EDU>
Cc: pthreads@MIT.EDU
In-Reply-To: <199509060424.NAA00828@megatherium.mri.co.jp>

NIIBE Yutaka writes:
 > 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?

I understand now.  Sorry, I was wrong.

The fd_table[fd]->flags _is_ user's view.

If __FD_NONBLOCK is set in fd_table[fd]->flags, it means user wants
non blocking I/O, so I/O operations can return EAGAIN.

The fix of (1) in my report is wrong.
-- 
NIIBE Yutaka


home help back first fref pref prev next nref lref last post