pcp
[Top] [All Lists]

__pmSetProgname

To: pcp@xxxxxxxxxxx
Subject: __pmSetProgname
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Tue, 27 May 2008 14:04:46 +1000
Organization: Aconex
Reply-to: nscott@xxxxxxxxxx
Sender: pcp-bounce@xxxxxxxxxxx
Hi,

The Win32 networking API requires applications to initialise
a version they want to work with before making any calls into
the API (including gethostname).  We need to call this in just
about every PCP application in order for it to be useful.

Unfortunately it can't be hidden in pmNewContext (or any other
existing PMAPI routine) cos the tools will often make a call
to gethostname or similar before calling into libpcp).

So, I was thinking of adding a __pmSetProgname which will set
pmProgname from argv[0] and on Windows have a side-effect of
making this dopey call to setup networking access.

Any objections?  Alternatives?

thanks.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>