home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os9
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!da_vinci!lookout.it.uswc.uswest.com!plyall
- From: plyall@lookout.it.uswc.uswest.com (Pete Lyall)
- Subject: Intercept() and I/O
- Message-ID: <Bxz2Ly.26D@da_vinci.it.uswc.uswest.com>
- Sender: news@da_vinci.it.uswc.uswest.com (IT Netnews)
- Nntp-Posting-Host: lookout
- Organization: U S WEST Information Technologies
- Date: Thu, 19 Nov 1992 16:46:45 GMT
- Lines: 31
-
-
- In getting back into OSK, I was reading the C Compiler manual the
- other day and noted that they (MW) appear to have have gotten rid of
- the 'signal()' function, and rely strictly on the 'intercept()'
- function.
-
- Also - in the discussion of the intercept function, mention is made
- that no I/O may be done while in the handler if I/O is also done in
- the main program. Argh! While I understand the need to have the
- handler be as expeditious as possible, there are times when having
- access to I/O would be very useful (closing files at termination, for
- one).
-
- The example MW assumes a fairly trivial program, and also forces you
- to effectively poll a flag to see if a signal has arrived. Ouch again.
-
- Is there a better way? Is it REALLY true that you can't have your
- intercept & mainline doing I/O? If so, why?
-
- What workarounds have others found?
-
- Also - has someone written 'signal(SIGNAL, handler)' for OSK, and/or
- was it brought back into the library for ANSI compatibility?
-
- Pete Lyall
-
- --
- Pete Lyall [USWest] Compuserve: 76703,4230 Internet: plyall@uswest.com
- --------------------------------------------------------------------------------
- I'm glad I had to wait a while, A little bit too juvenile, |Sweet Potato Pie
- I needed to refine my style, A silk suit and a crocodile smile!| James Taylor
-