From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 11 Nov 2007 16:48:39 -0800 Subject: [sup-talk] [PATCH] Title bar and status bar widget In-Reply-To: <1194518450-sup-4792@tomsk> References: <1194518450-sup-4792@tomsk> Message-ID: <1194827264-sup-5774@south> Hi Marcus, Excerpts from Marcus Williams's message of Thu Nov 08 02:44:44 -0800 2007: > This patch adds two new hooks that allow you to set the title bar of a > terminal (default is no title, to support non-terminal users) and the > status bar of sup (default is standard status bar string). This patch actually has a problem, which you can see if you try and use "say" from within one of those hooks, or if you insert an error into the hook code. The problem is that the hooks are executed from draw_status, which is executed within the context of a lock on Ncurses.mutex. BufferManager#flash (which is triggered by both a call to #say and an error) cannot be called within that lock or a double-lock exception occurs. So, either Ncurses.mutex needs to be a reentrant lock (I have played around with this but haven't yet been able to get it to work), or the code that runs these hooks needs to run outside of the lock (which takes place in BufferManager#draw_screen and #completely_redraw_screen). -- William