IPC/Sockets and blocking revisited...[THANKS]

Jonathan I. Kamens jik at athena.mit.edu
Mon Feb 18 08:48:01 AEST 1991


In article <1991Feb16.225731.20445 at en.ecn.purdue.edu>, hoff at en.ecn.purdue.edu (Michael Hoefflinger) writes:
|> Since I got such a quick and working response on my last question,
|> I think I will abuse this living user's manual some more:

  "Abuse" is the right word.  (1/2 :-)

|> -->  Question is, how can I execute a getchar() that will return with
|>      EOF immediately if the user has not typed anything, or with
|>      the char as soon as it is typed?  The problem is that getchar
|>      is buffered I/O, and apparently _fillbuf() doesn't exit back to
|>      getchar until a carriage return is executed.

  This is question 5 on the "Frequently Asked Questions about Unix - with
Answers" posting to comp.unix.questions.  If you can't get a hold of it at
your site, E-mail me and I'll send it to you.

-- 
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



More information about the Comp.unix.programmer mailing list