"James Hatheway" <[EMAIL PROTECTED]> writes:

> It seems that somewhere between the client and the wine server
> a file descriptor is not being closed, and eventually there
> are too many open files, thus the client is not able to
> open a connection with the server to create more new threads.

The real problem is that your program never closes the thread handles;
this causes a descriptor leak because we wait until the last close to
release the thread buffer. Following patch should fix this and allow
your test app to exhaust available memory instead ;-)

Index: server/thread.c
===================================================================
RCS file: /home/wine/wine/server/thread.c,v
retrieving revision 1.42
diff -u -r1.42 thread.c
--- server/thread.c     2000/03/17 15:16:58     1.42
+++ server/thread.c     2000/03/23 15:32:25
@@ -576,6 +576,8 @@
     wake_up( &thread->obj, 0 );
     detach_thread( thread, violent_death ? SIGTERM : 0 );
     remove_select_user( &thread->obj );
+    munmap( thread->buffer, MAX_REQUEST_LENGTH );
+    thread->buffer = (void *)-1;
     release_object( thread );
 }
 

-- 
Alexandre Julliard
[EMAIL PROTECTED]

Reply via email to