On Thu, 26 Feb 2004, Xia Hongtao wrote:
> But did diskHandleRead() and diskHandleWrite() enough? Dose there exist other functions called
> commSetSelect() to check a filesystem fd?
Not sure. I do not think so, but it is not a question which I have
considered before.
Why don't you verify the file type from fd_table in commSetSelect()
instead of doing a special case in diskHandleRead/Write?
fd_table[fd].type is guaranteed to be set to one of
FD_LOG
FD_FILE
FD_SOCKET
FD_PIPE
accordng to the type of file.
Note: For the FD_LOG fds it may be a little hard to know exacly what it is
connected to. Can be a pipe, terminal, file or /dev/null depending on what
the administrator is up to doing.
> That is one of the most important questions I want to know. The other
> question is that did I omited other kinds of fds? Currently I just
> focused on fs fds & pipe & socket.
We do not intentionally use any other types is fds unless you consider
terminal or /dev/null different from the above. Is there even any other
types of fds in a normal UNIX application?
Regards
Henrik
Received on Thu Feb 26 2004 - 01:22:17 MST
This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:04 MST