This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XWin does not delete the lock files


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]