[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: possible issue with bsd_poll() on Windows


On Wednesday, September 19, 2018 4:42 AM Andreas Schneider wrote:
> Does the attach patch give you a useful error?

Unfortunately no. At least on my machine ( Win 10 x64 ) I can't get strerror() to output anything but "Unknown error", even if I pass an error code like ECONNREFUSED directly in. I'd also have concerns about using strerror since at least on Windows it's not thread safe. I can use FormatMessage to get a valid error message so it probably makes sense to #ifdef. One other note - I don't thing prepending "Failed to poll context:" is appropriate because at least the errors I'm trying to bubble up aren't poll errors - they are connection errors.

I've attached a patch which includes my changes to poll.c to set set errno and session.c to translate errno to and ssh_err.

John

Attachment: win32_err_codes.patch
Description: win32_err_codes.patch


References:
RE: possible issue with bsd_poll() on WindowsJohn Dunn <John.Dunn@xxxxxxx>
Re: possible issue with bsd_poll() on WindowsAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org