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
|