Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jan 2000 13:15:43 +0100 (CET)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Giving a sighandler more information
Message-ID:  <200001111215.NAA22385@dorifer.heim3.tu-clausthal.de>
In-Reply-To: <85e7ll$1hto$1@atlantis.rz.tu-clausthal.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Laurence Berland <stuyman@confusion.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001111215.NAA22385>