[Help-gnutls] Re: Odd issue with gnu-tls 2.6.4 running as a subprocess of emacs-23 on Windows XP

Iver Odin Kvello iverodin at gmail.com
Wed Apr 15 00:44:24 CEST 2009

> The solution in 2.8.x. will be to avoid select() and use poll() instead,
> for which there is (allegedly) a more reliable wrapper implementation in
> gnulib:
> http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/poll.c

I see, that sounds great.

I actually managed to find and fix the bug in select.c (without any
extensive testing of course) - I've attached the patch in case this
could be useful temporarily or something.

I noticed that in select.c, normal handles would get 'translated'
using _get_osfhandle(), but pipes were not. Furthermore, stdin in this
case got an invalid handle error when GetFileType was called on it,
but this error wasn't detected, causing stdin to be treated as an
'uknown handle type' while it should have been a pipe. The result of
_get_osfhandle() called on stdin however *was* a pipe, so I applied
the same code to pipes as were already in place for 'normal'
filehandles, and that did the trick.

Regards, Iver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select.patch
Type: application/octet-stream
Size: 2409 bytes
Desc: not available
URL: </pipermail/attachments/20090415/06bacd88/attachment.obj>

More information about the Gnutls-help mailing list