home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os9 / 1436 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.7 KB  |  43 lines

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