From owner-freebsd-questions Tue Jan 11 4:15:47 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id 619E1153E1 for ; Tue, 11 Jan 2000 04:15:44 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.9.3/8.9.3) id NAA22385; Tue, 11 Jan 2000 13:15:43 +0100 (CET) (envelope-from olli) Date: Tue, 11 Jan 2000 13:15:43 +0100 (CET) Message-Id: <200001111215.NAA22385@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG Reply-To: freebsd-questions@FreeBSD.ORG Subject: Re: Giving a sighandler more information X-Newsgroups: list.freebsd-questions In-Reply-To: <85e7ll$1hto$1@atlantis.rz.tu-clausthal.de> User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (FreeBSD/3.4-19991219-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Laurence Berland wrote in list.freebsd-questions: > Oliver Fromme wrote: >> >> I'm afraid there is no other way than using global variables. >> Be sure to declare them as ``volatile sig_atomic_t''. >> > What does this do as compared to declaring them normally? It makes them work, as opposed to not work. :-) Seriously. You _must_ declare global variables which are accessed from a signal handler as ``volatile sig_atomic_t''. Everything else is _not_ guaranteed to work (and if it works, then it's just pure luck). Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message