Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!mips!dimacs.rutgers.edu!rutgers!mcdhup!inferno!shane From: shane@inferno.peri.com (Shane Bouslough) Newsgroups: comp.unix.questions Subject: Re: A question about read() system call!! Message-ID: <1991May29.180840.6512@inferno.peri.com> Date: 29 May 91 18:08:40 GMT References: <1361@anprda.atson.asahi-np.co.jp> Organization: Periphonics Corp. Lines: 37 From article <1361@anprda.atson.asahi-np.co.jp> akira@atson.asahi-np.co.jp (Akira Takiguchi) speaks too soon: > >>If the file is not open yet, you can specify the O_NDELAY option when you >>open the file. > > This has nothing to do with the problem. It makes open(2) non-blocking > but not read(2). BZZZZZZZZZZZ! <- game show buzzer And the Manual looketh upon O_NDELAY and spake: OPEN(2) O_NDELAY This flag may affect subsequent reads and writes. See read(2) and write(2). READ(2) When attempting to read from an empty pipe (or FIFO): If O_NDELAY is set, the read will return a 0. If O_NDELAY is clear, the read will block until data is written to the file or the file is no longer open for writing. And the Manual saw that O_NDELAY was good. > -- > | 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 -- Shane Bouslough | ...!rutgers!mcdhup!inferno!shane 516-467-0500 Periphonics Corp. | Ride Bike! 4000 Veterans Hwy. | "We're talking Mega-Ecstasy-Bliss!!!" Bohemia, NY 11716 | -David Lister, Red Dwarf