A question about read() system call!!
Jonathan I. Kamens
jik at athena.mit.edu
Thu May 23 00:59:26 AEST 1991
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 at 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 at 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.
More information about the Comp.unix.questions
mailing list