Re: WIN32 PSAPI patch

From: Guido Serassio <serassio@dont-contact.us>
Date: Sun, 21 Oct 2001 13:04:25 +0200

Hi Robert,

Il 12.58 21/10/2001 Robert Collins ha scritto:
> > OK, now I'm using Process Explorer from Sysinternals, and I can see all
> the
> > dynamically dll's loaded from cygwin1.dll, but there isn't psapi.dll ....
> > I have looked in Cygwin sources, and I have found the OS dependent dynamic
> > load of psapi.dll.
> >
> > Very strange ...
>
>It's quite a nice hack, and _very_ useful. It avoids explicit
>OpenLibrary and getsymbol calls in the code. You link against a dummy
>symbol that checks for the dll via OpenLibrary, resolves the symbol, and
>rewrites it's entry point to be a long jmp into the now loaded library.
>
> >
> > > > >Lastly, your xrename alteration to remove(to) is IIRC to handle win32
> > > > >rename semantics? A comment in the code there would be useful if that
> > >is
> > > > >indeed the case.
> > > >
> > > > OK, I add a more complete comment, and if this code is ok for you, I
> > >will
> > > > post a new patch.
> > >
> > >Yes, please do. I do think that a wrapper getrusage lib function is the
> > >Right Way to do this.
> > >
> > >Rob
> >
> > The only problems is how to handle the info lacks on Cygwin.
>
>Don't. I'll add the appropriate code to cygwin so that it is present in
>the cygwin getrusage. This will take a little longer, but will solve the
>problem without any messy #ifdef tests.
>
>
> > What about to add in tools.c a section like this:
> >
> > #ifdef _SQUID_CYGWIN_
> > #undef getrusage
> > #define getrusage WIN32_getrusage
> > #endif
>
>I don't like this - see above :].
>
>...
> > Let to know to me Your opinion.
>
>My call would be to let cygwin not have that info until cygwin
>1.3.4/1.3.5 is released.

At this point, I think that PSAPI is not useful on HEAD, so i work on the
function wrapper on Cygwin and native NT branch only.

>I need to get that socket handling issue you
>reported solved in cygwin before squid will be stable on the recent
>builds. (It's affecting apache on cygwin too, so it's not a squid
>issue).

I can confirm to You, that the Cygwin socket problem is only partially
fixed in 1.3.3 and in the latest snapshot.

Guido

>Rob

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
Tel. : +39.011.610749
E-mail: serassio@interfree.it
         serassio@libero.it
WWW: http://www.serassio.it
Received on Sun Oct 21 2001 - 05:04:39 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:34 MST