[Rxtx] RXTX serial port read() returns -1 unexpectedly and then blocks forever on close()
Kustaa.Nyholm at planmeca.com
Fri Mar 4 02:57:16 MST 2011
On 3/4/11 03:52, "Trent Jarvi" <tjarvi at qbang.org> wrote:
>Yes. RXTX was patched to behave the way it does. I don't fully
>understand the issue behind the patch. Marc noticed the odd behavior as
>well and offered a fix which was greeted with resistance.
>The windows implementation was done without real documentatino of the
>windows API. I think I had an example from the late 80's early 90's on
>Microsoft's site and some API documentation that was obviously not
>microsofts in Europe. Wayne Roberts had a real need for windows support
>and fixed some major issues it had. My interest at the time was mingw32.
>I then cleaned it up for some specific uses I had later. The read
>returning -1 when it should block didn't impact anybody and appeared to
>help some people. It isnt the documented behavior though.
>There could be all sorts of latent bugs in that code but in the real
>world, it gets by in almost all use cases.
I think so too, never had any problems with it.
> Its a hack but it worked for 100's of thousands of people over a 14 year
Yeah! Thanks for everyone who has contributed over the years, job well
>Maybe its time to
>revisit the code but there is more risk than gain for most people. How
>you move forward and avoid the risk?
My view is that it is quite risky and rather pointless to move forward,
other than fixing bugs that really affect people. At the moment the
major issue IMO is just that it seems (not been following this too
carefully, so maybe I'm wrong, so in case this FUD, my apologies)
that 'official' binaries are not available.
I think the rewrite, tempting as it is in some respects is not
the way forward. Just gentle maintenance to iron out real issues
and then get the binaries out.
More information about the Rxtx