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