You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@worldgate.com> on 1997/08/04 02:43:01 UTC
someone please explain ap_signal
On Sat, 26 Apr 1997 Roy wrote:
>>This patch can't be right -- all it does is redefine signal to
>>a function that doesn't exist. Either you forgot something,
>>or your system's on drugs.
>
>Never mind -- Dean explained it to me. I didn't know that you could
>redefine both declarations and uses with #define.
#define signal(s,f) ap_signal(s,f)
Sigfunc *signal(int signo, Sigfunc *func);
#endif
What does this do? How? Why? Huh?
Perhaps I am the one on drugs right now... or perhaps I don't have enough
of them...
Re: someone please explain ap_signal
Posted by Dean Gaudet <dg...@arctic.org>.
Well, you could change it so that we use ap_signal everywhere and don't
play with signal().
Dean
On Sun, 3 Aug 1997, Marc Slemko wrote:
> Gak. Ok. I understand, although I don't think I want to. Perhaps a
> comment should be added.
>
> Ok, so tell me what we do about PR#905, ie. compiling htdigest.
>
> The problem is:
>
> - htdigest includes ../src/md5c.c
> - md5c.c includes conf.h
> - conf.h redefines signal to ap_signal
> - the signal from http_main.c isn't included, so it don't work
>
> We don't need our new signal in htdigest, so I am not inclined to change
> things so it is linked in there.
>
> An OS may define signal to the_real_signal_that_works, so we can't just
> #undef signal after including md5c.c.
>
> On Sun, 3 Aug 1997, Dean Gaudet wrote:
>
> >
> >
> > On Sun, 3 Aug 1997, Marc Slemko wrote:
> >
> > > On Sat, 26 Apr 1997 Roy wrote:
> > >
> > > >>This patch can't be right -- all it does is redefine signal to
> > > >>a function that doesn't exist. Either you forgot something,
> > > >>or your system's on drugs.
> > > >
> > > >Never mind -- Dean explained it to me. I didn't know that you could
> > > >redefine both declarations and uses with #define.
> > >
> > > #define signal(s,f) ap_signal(s,f)
> > > Sigfunc *signal(int signo, Sigfunc *func);
> > > #endif
> > >
> > > What does this do? How? Why? Huh?
> >
> > It replaces all occurances of signal with ap_signal, including the
> > definition of signal in http_main.c. It is confusing, yes. The
> > alternative is to explicitly use ap_signal everywhere, and assume module
> > writers haven't messed up... but, then, modules shouldn't be dinking with
> > signals anyhow.
> >
> > Dean
> >
> >
>
>
Re: someone please explain ap_signal
Posted by Marc Slemko <ma...@worldgate.com>.
Gak. Ok. I understand, although I don't think I want to. Perhaps a
comment should be added.
Ok, so tell me what we do about PR#905, ie. compiling htdigest.
The problem is:
- htdigest includes ../src/md5c.c
- md5c.c includes conf.h
- conf.h redefines signal to ap_signal
- the signal from http_main.c isn't included, so it don't work
We don't need our new signal in htdigest, so I am not inclined to change
things so it is linked in there.
An OS may define signal to the_real_signal_that_works, so we can't just
#undef signal after including md5c.c.
On Sun, 3 Aug 1997, Dean Gaudet wrote:
>
>
> On Sun, 3 Aug 1997, Marc Slemko wrote:
>
> > On Sat, 26 Apr 1997 Roy wrote:
> >
> > >>This patch can't be right -- all it does is redefine signal to
> > >>a function that doesn't exist. Either you forgot something,
> > >>or your system's on drugs.
> > >
> > >Never mind -- Dean explained it to me. I didn't know that you could
> > >redefine both declarations and uses with #define.
> >
> > #define signal(s,f) ap_signal(s,f)
> > Sigfunc *signal(int signo, Sigfunc *func);
> > #endif
> >
> > What does this do? How? Why? Huh?
>
> It replaces all occurances of signal with ap_signal, including the
> definition of signal in http_main.c. It is confusing, yes. The
> alternative is to explicitly use ap_signal everywhere, and assume module
> writers haven't messed up... but, then, modules shouldn't be dinking with
> signals anyhow.
>
> Dean
>
>
Re: someone please explain ap_signal
Posted by Dean Gaudet <dg...@arctic.org>.
On Sun, 3 Aug 1997, Marc Slemko wrote:
> On Sat, 26 Apr 1997 Roy wrote:
>
> >>This patch can't be right -- all it does is redefine signal to
> >>a function that doesn't exist. Either you forgot something,
> >>or your system's on drugs.
> >
> >Never mind -- Dean explained it to me. I didn't know that you could
> >redefine both declarations and uses with #define.
>
> #define signal(s,f) ap_signal(s,f)
> Sigfunc *signal(int signo, Sigfunc *func);
> #endif
>
> What does this do? How? Why? Huh?
It replaces all occurances of signal with ap_signal, including the
definition of signal in http_main.c. It is confusing, yes. The
alternative is to explicitly use ap_signal everywhere, and assume module
writers haven't messed up... but, then, modules shouldn't be dinking with
signals anyhow.
Dean