Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!deccrl!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: A question about read() system call!! Message-ID: <1991May22.145926.9719@athena.mit.edu> Date: 22 May 91 14:59:26 GMT References: <28398698.26968@maccs.dcss.mcmaster.ca> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 36 The default behavior of read() is to wait until there is something to read unless either (a) you have reached EOF, in which case it returns 0, or (b) there has been some error, in which case it returns -1. The "Frequently Asked Questions about Unix" posting in this newsgroup discusses, in question number 7 how to check if there are characters to read without reading them, and how to read if there are characters to read but return otherwise. If the FAQ posting has expired at your site, you can get a copy using the instructions at the end of this message. It is usually a good idea to read the FAQ posting, or at least to scan it looking for material that might help you, before posting a question in any of the comp.unix newsgroups. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710 -- Subject: Frequently Asked Questions about Unix - with Answers [Monthly posting] Newsgroups: comp.unix.questions Available via anonymous ftp from pit-manager.mit.edu (18.72.1.58) in the file /pub/usenet/comp.unix.questions/Frequently_Asked_Questions_about_Unix_-_with_Answers_[Monthly_posting] Available from mail-server@pit-manager.mit.edu by sending a message containing send usenet/comp.unix.questions/Frequently_Asked_Questions_about_Unix_-_with_Answers_[Monthly_posting] Send a message containing "help" to get general information about the mail server.