|
From: | Steven Tamm |
Subject: | Re: Mac OS X - Hang / C-g problem patch |
Date: | Sat, 7 Dec 2002 22:15:21 -0800 |
Hi Andrew (and others interested in this problem), I've checked in your patch with a few modification.First, I added code to check for C-g instead of C-. to macterm.c. Right now it will only work if the quit_char is C-g, but I plan on adding code that will convert from ascii -> keycode later. Anywhere this check should be done, call mac_check_for_quit_char(). Second, I made sys_read depend on sys_select to do the blocking. I also made sys_select handle NULL as the timeout (so that sys_read could block forever) Third, I didn't use signals, but instead sent the quit_char as an input_event to kbd_buffer_store_event. This seemed like a better idea than directly using signals because things like last_event_timestamp are updated. I left the call to mac_check_for_quit_char in Feval with a note in the cvs log that it might be removed.
I tried to run some profiling tests but none of the data I got seemed useful. It seems to not be that expensive a call. In any case I filed a couple radar bugs to see if the WindowManager could be programmed to send a signal based on a hotkey. It's bug 3121160 (Allow ability to have a keypress cause a signal in Carbon). I also reported a bug to be able to set the main event queue for an application to be a secondary thread, but doubt that it will go anywhere due to thread safety issues.
-Steven
[Prev in Thread] | Current Thread | [Next in Thread] |