home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.programming:3380 comp.unix.programmer:5805
- Path: sparky!uunet!spool.mu.edu!uwm.edu!csd4.csd.uwm.edu!markh
- From: markh@csd4.csd.uwm.edu (Mark)
- Newsgroups: comp.programming,comp.unix.programmer
- Subject: Re: Network Chat Messaging Algorithm
- Followup-To: comp.unix.programmer
- Date: 31 Dec 1992 19:08:17 GMT
- Organization: Computing Services Division, University of Wisconsin - Milwaukee
- Lines: 19
- Message-ID: <1hvgf1INNkb1@uwm.edu>
- References: <1h8752INNn3i@darkstar.UCSC.EDU> <1h9k9hINN670@uwm.edu> <1992Dec31.023104.13944@netcom.com>
- NNTP-Posting-Host: 129.89.7.4
-
- markh@csd4.csd.uwm.edu (Mark) writes:
- >Net lag is not causing those problems, select() is. Always check for blocking
- >even if set in non-blocking mode, because select() sometimes blocks regardless.
- >Or, better, don't use select(). Use fork().
-
- In article <1992Dec31.023104.13944@netcom.com> pdh@netcom.com (Phil Howard ) writes:
- >Of course select() blocks. It's supposed to if none of the fd's have anything
- >and the time is non-zero.
-
- You misunderstood. My fault. I meant to say: always check for blocking by
- setting all devices to non-blocking mode, because select() sometimes indicates
- devices ready for I/O that are still in a blocking state, regardless of
- whether you set them for non-blocking or not.
-
- All devices have to be set for non-blocking mode even if you use select(), and
- you have to check for EWOULDBLOCK on the device select()'ed on each I/O access.
-
- It's a moot point. The problem referred to in the original article has already
- been demonstrably proven to be solved with fork().
-