home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!nic.umass.edu!dime!robinson
- From: robinson@elux3.cs.umass.edu (RICHARD ROBINSON)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: A couple of questions
- Message-ID: <56396@dime.cs.umass.edu>
- Date: 18 Nov 92 16:35:51 GMT
- References: <55989@dime.cs.umass.edu> <1992Nov13.063457.22216@ucc.su.OZ.AU> <56246@dime.cs.umass.edu> <1992Nov16.222301.21722@jato.jpl.nasa.gov>
- Sender: news@dime.cs.umass.edu
- Reply-To: robinson@elux3.cs.umass.edu (RICHARD ROBINSON)
- Organization: The Realm of Dread
- Lines: 41
-
- In article <1992Nov16.222301.21722@jato.jpl.nasa.gov> jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
- >In article <56246@dime.cs.umass.edu> robinson@elux2.cs.umass.edu (RICHARD ROBINSON) writes:
- >>
- >>In article <1992Nov13.063457.22216@ucc.su.OZ.AU> willw@extro.ucc.su.OZ.AU (William Waring) writes:
- >>
- >>Anyway, ACTION_READ, not ACTION_SCREEN_MODE... I am doing asynchronous
- >>reads by sending a ACTION_READ packet. Read(filehandle,buffer,x) would freeze
- >>me up. It has nothing to do with the mode of the console.
- >
- >Oh, yes it does! If the console is not operating under RAW mode, then reads
- >will block until the number of chacters to read (in this case 'x') has been
- >read.
-
- Reads will block regardless of mode!!! In RAW mode, reads will block until
- x characters have been read. Otherwise, a newline will terminate the read.
- That is why I am sending a packet - no blocking. I just wait on a message
- port (along with all my other ports). It has nothing to do with whether I
- am waiting for 1 character under RAW mode (what I am doing), or waiting for
- a newline-terminated line under CON mode. The point is that the user is no
- longer in a position to type anything, the packet is still out, and need
- it killed.
-
- >
- >>I send a READ,
- >>and when it returns, stuff the character into a pipe. When I am ready
- >>to exit, there is one outstanding read. I need to be able to kill it.
- >
- >Another way would be to generate the number of characters needed to satisfy
- >the read request when your program wanted to exit. This could be done by
- >using the IND_WRITEEVENT command of the Input device. This precludes that
- >your program's window would be the one currently receiving input when the
- >program decided to exit.
-
- Sorry, the program's is a little more complex. I have outstanding reads on
- pipes, console windows, and AUX:. I need a generic way to kill that darn
- packet.
-
- --
- Dread (Richard Robinson, Univ of Mass, Amherst)
- dread@titan.ucc.umass.edu "There is no right, there is only power!"
- robinson@elux3.cs.umass.edu "Kill them, kill them all!"
-