πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78518

Re: innd crashing

#78518
From: Russ Allbery
Date: Sat, 19 Jan 2008 20:31
34 lines
2090 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> /*
> **  Signal handler to catch SIGTERM and similar signals and queue a clean
> **  shutdown.
> */
> static RETSIGTYPE
> catch_terminate(int sig)
> {
>    GotTerminate = true;
>    killer_signal = sig;
>
> #ifndef HAVE_SIGACTION
>    xsignal(signal, catch_terminate);
> #endif
> }
>
> Shouldn't sig also be a sig_atomic_t (that is to say a long on 64-bit
> architectures)?

No, signal handlers take an int.  See man sigaction, specifically the type
for sa_handler.

> (And where is "signal" defined in the !HAVE_SIGACTION section?)

That's a bug.  That should be sig, not signal.  (It's a somewhat
irrelevant bug at this point since I doubt any platform on which anyone is
running INN lacks sigaction, but still.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87sl0tblqu.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <fmslth$im5$1@news.mixmin.net> <fmt5jm$mv0$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <87sl0tblqu.fsf@windlord.stanford.edu>
Subject: Re: innd crashing
Date: Sat, 19 Jan 2008 12:31:37 -0800
From: Russ Allbery <rra@stanford.edu>
References: <fmslth$im5$1@news.mixmin.net> <fmt5jm$mv0$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 34
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.Stanford.EDU 1200774697 14731 171.64.19.147 (19 Jan 2008
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Cancel-Lock: sha1:iJoicVcD2Abzx9xXxidhrsdPdrQ=