home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / os9 / 1215 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.2 KB  |  30 lines

  1. Newsgroups: comp.os.os9
  2. Path: sparky!uunet!wupost!gumby!yale!yale.edu!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!milo.mcs.anl.gov!poseidon!saunders
  3. From: saunders@aps.anl.gov (Claude Saunders)
  4. Subject: how to do concurrent read/write on terminal?
  5. Message-ID: <1992Sep9.223924.5962@mcs.anl.gov>
  6. Keywords: input output
  7. Sender: usenet@mcs.anl.gov
  8. Reply-To: saunders@aps.anl.gov
  9. Organization: Argonne National Lab -- APS
  10. Date: Wed, 9 Sep 1992 22:39:24 GMT
  11. Lines: 17
  12.  
  13. I have a control program (in Microware-C) running under OS-9 which 
  14. accepts commands from /t1 and also periodically writes to /t1. 
  15. There is a separate fork'ed process for reading commands and 
  16. for periodic writes. (There are reasons behind this design.)
  17.  
  18. The problem is that the gets() in the consuming process sleeps and prevents
  19. the producing process from getting characters out to the terminal.
  20.  
  21. Is there any way of solving this without installing a signal intercept
  22. function and grabbing unbuffered characters one at a time with getchar()?
  23. That solution is essentially duplicating the driver.
  24.  
  25. Is there some mode I can set that will allow printf's while another process
  26. is sitting in gets()? Do I need to open() additional file descriptors?
  27.  
  28. Thanks in advance,
  29. -- an OS-9 novice --
  30.