dlls/kernel/comm.c: not releasing file descriptors?
Cihan Altinay
cihan at uq.edu.au
Thu Nov 3 01:38:01 CST 2005
Hi,
I am trying to get G-Ware[1] to run under wine which provides a user
interface to set up Echo Canceller Units made by ClearOne. The unit is
connected to the serial port (com1 = ttyS0).
The only way I can start the program at all is by configuring wine to
act as Windows 95/98 and using native COM dll's. Furthermore,
'GWare.exe' starts 'PSRServe.exe' under native Windows but not under
wine so I do the following in a bash file:
wine C:\\Program\ Files\\G-Ware\\PSRServe.exe &
wine C:\\Program\ Files\\G-Ware\\GWare.exe
When I connect to the device I get endless
fixme:comm:COMM_WaitCommEvent EV_RXFLAG not handled
messages before communication breaks with this:
wine client error:3bc: pipe: Too many open files
After investigating I found out that indeed the number of open pipes
to ttyS0 increases statically so I tried to find the reason and suspect
the following (using the CVS checkout from 20051102):
In the function COMM_WaitCommEvent in /dlls/kernel/comm.c line 2106 a
thread is created for WaitCommEventService. However, in this branch of
the if-statement fd is not released (using release_comm_fd).
Releasing fd seems to work and the number of open pipes don't get past
200-300.
I am new to wine development and this is just a guess and I might be
totally wrong. Unfortunately this does not fix the communication with
the device (It reports timeouts and errors retrieving values etc).
I guess this has to do with the first fixme messages I mentioned.
Can anybody tell me what EV_RXFLAG is used for?
Using WINEDEBUG=+tid,+comm I compared the output to what Sysinternals
PortMon[2] gives me on native Windows and it really looks promising. Is
there a way to display the actual data that was sent/received through
the serial port? I tried WINEDEBUG=+io which does not work.
The program uses threads so there might as well be other issues.
Cheers,
Cihan
---
[1] http://www.clearone.com/docs/downloads/G-Ware5.0.6.zip (20MB)
[2] http://www.sysinternals.com/Utilities/Portmon.html
More information about the wine-devel
mailing list