Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 61069 invoked by uid 500); 11 Jul 2001 14:43:07 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 60624 invoked from network); 11 Jul 2001 14:42:48 -0000 Date: Wed, 11 Jul 2001 07:43:14 -0700 (PDT) From: X-Sender: To: Luke Kenneth Casson Leighton Cc: , David Reid , apr dev , Subject: Re: lib/apr_signal.c In-Reply-To: <20010711155057.B29928@angua.rince.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N APR doesn't really handle signals, for a very good reason. They are incredibly non-portable, and very difficult to deal with. Having said that, there are some APR functions for dealing with signals. 1) apr_signal. Just like signal, only portable and predictable 2) apr_signal_thread puts a single thread into sigwait. Whenever ANY signal is received that thread is woken up, and a function is called. The function is passed in to the setup_signal_thread function. 3) You can get a list of signals understood by the machine. I can't remember the function, but it is there. Most of Apache specifically tries to avoid any signals, although the parent still relies on SIGWINCH, SIGTERM, and SIGHUP. And the children rely on SIGTERM and sometimes on SIGINT. Ryan On Wed, 11 Jul 2001, Luke Kenneth Casson Leighton wrote: > i've just this minute checked out httpd 2.0 > > the function apr_signal is still used in about > four places > in httpd, according to latest cvs. doing a grep > > now whether any of those actually _compile_ is > another matter for more than a cursory glance. > > ... which brings me [doggedly] back to a question > i asked last week but did not get a response: > > how is signal handling dealt with in APR? > > how do i block or catch signals? > > i do not want to fall foul of the report by todd sabin from > razor.bindview.com that says that 80% of programs written for > unix are vulnerable to SIGNAL attacks - especially > SIG_PIPE. > > > i do not pretend to understand all > of the issues but i know that they are there, > so i am raising them here > for people with more experience than i to > address them > > > what is APR and httpd's view with respect to signals and > signal blocking? > > how is this handled? > > > On Tue, Jul 10, 2001 at 03:41:49PM -0700, rbb@covalent.net wrote: > > > > +1 > > > > Ryan > > > > On Tue, 10 Jul 2001, David Reid wrote: > > > > > Why do we still have the apr_signal.c file in lib? We don't seem to be > > > building it anymore so can it be removed as well? If so I'll also > > > remove the Makefile.in as we're not doing anything in the lib directory > > > anymore. > > > > > > david > > > > > > > > > > > > > > > > > > _____________________________________________________________________________ > > Ryan Bloom rbb@apache.org > > Covalent Technologies rbb@covalent.net > > ----------------------------------------------------------------------------- > > _____________________________________________________________________________ Ryan Bloom rbb@apache.org Covalent Technologies rbb@covalent.net -----------------------------------------------------------------------------