This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: XWin does not delete the lock files
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: cygwin-xfree at cygwin dot com
- Cc: rodmedina at cantv dot net
- Date: Mon, 05 Apr 2010 22:10:35 +0100
- Subject: Re: XWin does not delete the lock files
- References: <380-22010323021251252@cantv.net>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: cygwin-xfree at cygwin dot com
On 30/03/2010 22:02, Rodrigo Medina wrote:
I have found that XWin -multiwindow -clipboard& dos not remove the lock
files when it is stopped
with the 'Exit' button of the XWin menu
[...]
Thanks for the reproduction steps here, although I wasn't able to reproduce
the problem without also connecting an xterm before shutting down the X server.
At least part of the problem seems to be awesomely bad multi-threaded code: It
looks like the code thinks XSetIOErrorHandler() sets a per-thread handler,
rather than the global handler it actually sets, so each client thread sets it
to a handler which longjmp()s somewhere, and we end up getting the last one
which happened to get installed if the handler ever actually gets called, with
hilarious consequences... (longjmp()ing to a setjmp() buffer allocated in
another thread being undefined, and even if it happens to work, it isn't going
to do the right thing)
This also seems to be the cause of the segfault on shutdown you have reported
in another thread.
I've had a go at working around these issues a bit, although the only way of
handling the multithreading correctly looks to be to re-write the clipboard
and multiwindow WM to use xcb.
Perhaps you could try out the test build I have uploaded at [1] and see if
that resolves this problem for you?
[1] ftp://cygwin.com/pub/cygwinx/XWin.20100405215019.exe.bz2
--
Jon TURNEY
Volunteer Cygwin/X X Server maintainer
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/