home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os9 / 1442 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1008 b   |  30 lines

  1. Newsgroups: comp.os.os9
  2. Path: sparky!uunet!mcrware!dibble
  3. From: dibble@microware.com (Peter Dibble)
  4. Subject: Re: Intercept() and I/O
  5. Message-ID: <1992Nov20.212556.3817@microware.com>
  6. Sender: news@microware.com
  7. Nntp-Posting-Host: seldon
  8. Organization: Microware Systems Corp., Des Moines, Iowa
  9. References: <Bxz2Ly.26D@da_vinci.it.uswc.uswest.com>
  10. Date: Fri, 20 Nov 1992 21:25:56 GMT
  11. Lines: 17
  12.  
  13. Signal() is in the ultra C compiler's library.
  14.  
  15. The manual's statements about I/O in signal intercept routines
  16. may be over-careful.  C's high-level I/O functions are
  17. not async-safe.  Consequently strange things can happen
  18. if you interrupt a printf with another printf in a signal
  19. intercept routine.
  20.  
  21. This can be solved by masking signals when high-level I/O
  22. functions run.  There are lots of other possibilities.
  23. An unusual one is to do {\em all} I/O from intercept routines. :-)
  24.  
  25. I do I/O in signal intercept routines. 
  26. When I feel careful I use low-level I/O to keep out of the
  27. way of the high-level stuff.
  28.  
  29. Peter
  30.