home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sdrc!thor!scjones
- From: scjones@thor.sdrc.com (Larry Jones)
- Newsgroups: comp.lang.c
- Subject: Re: longjumping out of a signal handler
- Message-ID: <2405@sdrc.COM>
- Date: 16 Dec 92 22:59:14 GMT
- References: <1992Dec09.185512.33137@spillman.uucp> <4233@dozo.and.nl>
- Sender: news@sdrc.COM
- Lines: 21
-
- In article <4233@dozo.and.nl>, jos@and.nl (Jos Horsmeier) writes:
- > True, all true, as far as I can find in the ANSI C standard, it's
- > perfectly safe now to use longjmp() from within a signal function.
- > No special prerequisites are necessary ...
-
- Remember that the ANSI C Standard really only talks about *synchronous*
- signals that occur because the program called raise(). As far as
- *asynchronous* signals (which are the interesting kind), what it says
- (in 4.7.1.1 The signal Function) is:
-
- ...the behavior is undefined if the signal handler calls
- any function in the standard library other than the signal
- function itself (with a first argument of the signal number
- corresponding to the signal that caused the invocation of
- the handler) or refers to any object with static storage
- duration other than by assigning a value to a static storage
- duration variable of type volatile sig_atomic_t.
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
- Geez, I gotta have a REASON for everything? -- Calvin
-