home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!oracle.us!us.oracle.com!wkaufman
- From: wkaufman@us.oracle.com
- Newsgroups: comp.lang.c
- Date: 18 Jul 92 20:46 MDT
- Subject: Re: Handling signals (was: trappin
- Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
- Message-ID: <1992Jul18.164658.14314@oracle.us>
- Nf-ID: #N:1992Jul18.164658.14314@oracle.us:2096584799:001:1278
- Nf-From: us.oracle.com!wkaufman Jul 18 20:46:00 1992
- Lines: 27
-
-
- In article <1992Jul17.141248.4837@mdd.comm.mot.com> mitchell@mdd.comm.mot.com (Bill Mitchell) writes:
- ]
- ] Looking in PJP's "The Standard C Library", chapter 9, I see that he goes on
- ] at some length about syncronization and other problems which can occur in
- ] handling signals. In part, he says:
- ]
- ] The occurence of a signal introduces a second thread of control within
- ] a program. That raises all sorts of issues about syncronization and
- ] reliable operation. The C Standard promises little in either regard.
- ] C programs have been handling signals since the earliest days of the
- ] language. Nevertheless, a portable program can safely take very few
- ] actions within a signal handler.
-
- OK, so this just says that the signal handler should be *very*
- careful about touching global variables, right? Doing nothing,
- exit()'ing, or writing to a variable that the main program only reads
- from (or vice versa)--these should all be safe, right?
-
- Is there anything else that would be guaranteed to work?
-
- -- Bill K.
-
- Bill Kaufman, | "Hush my darling / Be still my darling /
- Corporate Lackey | The lion's on the phone,..."
- wkaufman@us.oracle.com | -- "The Guitar", They Might Be Giants
-
-