named pipe oddity
Dan Kegel
dank at kegel.com
Fri Feb 21 23:21:31 CST 2003
Gregory M. Turner wrote:
> On Monday 17 February 2003 08:26 pm, Dan Kegel wrote:
>>The simple sequence
>> CreateNamedPipe
>> CreateFile
>>seems to work under Windows, but not under Wine.
>>Does Wine for some reason require a ConnectNamedPipe between the two? ...
>
> nice catch!
>
> This explains some things I've been noticing lately ;) There have been race-conditions in
> RPC lately, my uncomitted "rpc testcase" patch exposes them. Maybe you've found code
> (or hardware?) to consistently expose the losing side of the race? Wish I had a dualie for
> stuff like this ;)
No need for a dual processor to magnify this bug!
Just apply the attached patch, and I bet you'll get the
race to trigger every time you do an installshield install.
It shows up as the dialog box "Object not registered".
BTW I'm slowly adding to tests/pipe.c; I need to exercise a few
more calls, then it'll be a handy little unit test for anyone
fixing up the named pipe support. (Just don't forget to remove
the todo_wine in the test, else it won't actually test anything.)
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
-------------- next part --------------
Index: dlls/ole32/rpc.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/rpc.c,v
retrieving revision 1.10
diff -u -p -d -u -r1.10 rpc.c
--- dlls/ole32/rpc.c 14 Feb 2003 23:30:50 -0000 1.10
+++ dlls/ole32/rpc.c 22 Feb 2003 05:11:21 -0000
@@ -669,6 +669,10 @@ _StubMgrThread(LPVOID param) {
FIXME("pipe creation failed for %s, le is %lx\n",pipefn,GetLastError());
return 1; /* permanent failure, so quit stubmgr thread */
}
+#if 1
+ /* widen the window for the race condition */
+ Sleep(50);
+#endif
if (!ConnectNamedPipe(listenPipe,NULL)) {
ERR("Failure during ConnectNamedPipe %lx!\n",GetLastError());
CloseHandle(listenPipe);
More information about the wine-devel
mailing list