home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19024 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  842 b 

  1. Path: sparky!uunet!usc!hacgate!turbo4.rsg.hac.com!lee
  2. From: lee@turbo4.rsg.hac.com (C. Lee)
  3. Newsgroups: comp.sys.sgi
  4. Subject: how to terminate a `read' gently?
  5. Message-ID: <24813@hacgate.SCG.HAC.COM>
  6. Date: 21 Jan 93 17:04:58 GMT
  7. Sender: news@hacgate.SCG.HAC.COM
  8. Organization: Hughes Transportation Simulation Center, HAC; Culver City, CA
  9. Lines: 13
  10.  
  11. I have a non-graphics application where I have a read on stdin, and if
  12. a second process sets a flag in shared memory I want to end the read,
  13. but not the first program/process.
  14.  
  15. How can I get the first process' read to end without killing the process?
  16.  
  17. If I use a signal, won't the signal handler exit and resume where it left
  18. off, i.e. in the read?
  19.  
  20. I thought the description of SIGTTIN sounded like it would make the read
  21. return with EIO, but I couldn't get it to work.
  22.  
  23. Thanks for any help.
  24.