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