Re: Win32 testing needed - Mailing list pgsql-hackers-win32

From Andreas Pflug
Subject Re: Win32 testing needed
Date
Msg-id 4113CD5A.6070200@pse-consulting.de
Whole thread Raw
In response to Re: Win32 testing needed  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Win32 testing needed  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers-win32
Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
>
>>             ereport(LOG,
>>                     (errcode_for_file_access(),
>>-                     errmsg("could not read from logger pipe: %m")));
>>+                     errmsg("could not read from logger pipe: %lu", error)));
>
>
> Does %m actually give a wrong result here?  Because if it does,
> errcode_for_file_access() is wrong too.

Yes, errno is not set. Same issue for CreatePipe; I missed that.

Maybe we should consider examining GetLastError() and FormatMessage()
(the equivalent of strerror, a sample is in the symlink/junction code)
for %m under win32; these will work for standard posix operations also
and might give much more detailed messages in many situations.

Regards,
Andreas

pgsql-hackers-win32 by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Win32 testing needed
Next
From: Andreas Pflug
Date:
Subject: Re: Win32 testing needed