Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.programmer Subject: Re: IPC/Sockets and blocking revisited...[THANKS] Keywords: IPC, sockets, blocking Message-ID: <1991Feb17.214801.29602@athena.mit.edu> Date: 17 Feb 91 21:48:01 GMT References: <1991Feb16.225731.20445@en.ecn.purdue.edu> Sender: news@athena.mit.edu (News system) Distribution: na Organization: Massachusetts Institute of Technology Lines: 21 In article <1991Feb16.225731.20445@en.ecn.purdue.edu>, hoff@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710