apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: lib/apr_signal.c
Date Wed, 11 Jul 2001 14:43:14 GMT

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
-----------------------------------------------------------------------------


Mime
View raw message