home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 16033 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  2.5 KB

  1. Path: sparky!uunet!caen!nic.umass.edu!dime!robinson
  2. From: robinson@elux3.cs.umass.edu (RICHARD ROBINSON)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: A couple of questions
  5. Message-ID: <56396@dime.cs.umass.edu>
  6. Date: 18 Nov 92 16:35:51 GMT
  7. 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>
  8. Sender: news@dime.cs.umass.edu
  9. Reply-To: robinson@elux3.cs.umass.edu (RICHARD ROBINSON)
  10. Organization: The Realm of Dread
  11. Lines: 41
  12.  
  13. In article <1992Nov16.222301.21722@jato.jpl.nasa.gov> jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  14. >In article <56246@dime.cs.umass.edu> robinson@elux2.cs.umass.edu (RICHARD ROBINSON) writes:
  15. >>
  16. >>In article <1992Nov13.063457.22216@ucc.su.OZ.AU> willw@extro.ucc.su.OZ.AU (William Waring) writes:
  17. >>
  18. >>Anyway, ACTION_READ, not ACTION_SCREEN_MODE... I am doing asynchronous
  19. >>reads by sending a ACTION_READ packet. Read(filehandle,buffer,x) would freeze
  20. >>me up. It has nothing to do with the mode of the console.
  21. >
  22. >Oh, yes it does! If the console is not operating under RAW mode, then reads
  23. >will block until the number of chacters to read (in this case 'x') has been
  24. >read. 
  25.  
  26. Reads will block regardless of mode!!! In RAW mode, reads will block until
  27. x characters have been read. Otherwise, a newline will terminate the read.
  28. That is why I am sending a packet - no blocking. I just wait on a message
  29. port (along with all my other ports). It has nothing to do with whether I
  30. am waiting for 1 character under RAW mode (what I am doing), or waiting for
  31. a newline-terminated line under CON mode. The point is that the user is no
  32. longer in a position to type anything, the packet is still out, and need
  33. it killed.
  34.  
  35. >
  36. >>I send a READ,
  37. >>and when it returns, stuff the character into a pipe. When I am ready
  38. >>to exit, there is one outstanding read. I need to be able to kill it.
  39. >
  40. >Another way would be to generate the number of characters needed to satisfy
  41. >the read request when your program wanted to exit. This could be done by
  42. >using the IND_WRITEEVENT command of the Input device. This precludes that
  43. >your program's window would be the one currently receiving input when the
  44. >program decided to exit. 
  45.  
  46. Sorry, the program's is a little more complex. I have outstanding reads on
  47. pipes, console windows, and AUX:. I need a generic way to kill that darn
  48. packet.
  49.  
  50. --
  51. Dread                      (Richard Robinson, Univ of Mass, Amherst)
  52. dread@titan.ucc.umass.edu          "There is no right, there is only power!"
  53. robinson@elux3.cs.umass.edu             "Kill them, kill them all!" 
  54.