A question about read() system call!!

Akira Takiguchi akira at atson.asahi-np.co.jp
Thu May 30 12:42:37 AEST 1991


In article <1991May29.180840.6512 at inferno.peri.com> shane at inferno.peri.com (Shane Bouslough) writes:
[I pointed out that open(,O_NDELAY,) doesn't make read() non-blocking.
>BZZZZZZZZZZZ! <- game show buzzer
>
>And the Manual looketh upon O_NDELAY and spake:
[deleted]

     I was half wrong, since there are systems (SysV, posix) that makes read
non-blocking if the descriptor is opened with O_NDELAY (or O_NONBLOCK) set.
But there ARE systems (BSD) that behaves differently so it is safer to
recommend fcntl(O_NDELAY) especially when the original poster didn't mention
about his OS.
-- 
       |    Akira Takiguchi  at ATSON, Inc. (a subsidiary of the Asahi Shimbun)
       |                WAKO GINZA bldg.  8-10-4 Ginza Chuo-ku Tokyo 104  Japan
       | Phone +81 3 3289 7051  Fax +81 3 3289 7066  SORRY, EMAIL NOT AVAILABLE



More information about the Comp.unix.questions mailing list