http://bugs.winehq.org/show_bug.cgi?id=17195
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #154 from Sebastian Lackner sebastian@fds-team.de --- Since noone seems to be working on this anymore, we (= the Wine-compholio team) decided to give it another try. ;-) First of all, when taking a look at all the approaches which have been there so far, there are immediately two things I've noticed:
* At my opinion its unlikely that AJ will accept a solution, which involves the wineserver roundtrip time. It would decrease performance significantly compared to all the previous wine versions, and so is probably not a good thing...
* Even if some of the implementations are probably (mostly) correct, the tests are not sufficient to show that. A lot of corner cases are not tested at all, for example:
- partial receiving of messages - partial receiving from multiple threads or processes - result of PeekNamedPipe for partial reads - tests for very large messages (which don't fit in the system buffer) - zero byte messages
In addition to the problems above: The current tests are in a very bad shape. What is the purpose of something like that below? It just hides test failures and regressions ... --- snip --- if (avail != sizeof(obuf)) /* older Linux kernels only return the first write here */ ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes available\n", avail); --- /snip ---
I wrote all the remaining tests during the last few days, and afterwards we evaluated all possible strategies. The best one we found (for Linux) is using a specific feature called SO_PEEK_OFF, which is only available for kernel >= 3.4, and allows to implement everything "almost" correct. So far we don't have a good solution for MacOS yet, but probably there is something similar - I don't have a Mac, so I cannot really test unfortunately.
You can find my proof-of-concept patch here (it also contains parts by Erich E. Hoover and one test by Adam Martinson): --> http://ix.io/dKs
Splitted version (requires ./tools/make_requests): --> https://github.com/compholio/wine-compholio/tree/namedpipe/patches/kernel32-...
After I've found out how to deal with the ugly existing tests (remove such ifs?!), I'll start submitting the tests, one after each other. This might take some more time, so please be patient ... ;) The actual implementation will follow afterwards, and might take even some more time. In the meantime please test my patches above, and report if it works for your app. They should apply cleanly on wine-1.7.23-33-gc654b7b.
Regards, Sebastian