mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Use inotify to check for changes to the defaults database. Workaround for
event handler timer. After upgrading my kernel recently I noticed that dnotify has been depreciated, so I decided to try and implement the new inotify code in Window Maker instead. During testing, I also found that one of the timers which was removed (the one causing the most wake-ups), calling delayedAction, was responsible for handling signals. Basically with this timer removed, signals were only handled after an X event occurs. After looking at the delayedAction function, I couldn't see the purpose of it. It certainly wouldn't cause any delay as it was called by the timer every 500ms, so there is no time correlation with when a signal was received. Also, it appeared to count the signals and call DispatchEvent for each one, but it appears DispatchEvent would just handle the most recent signal and take action on that. The signals handled by delayedAction are the various exit and reset signals, so only one need to be handled. I therefore have commented out delayedAction (it wasn't called by any other procedure) and added a call to DispatchEvent imediately after the signal is registered, in handleExitSig. I'm not sure what problems this may cause with dead children - these are only cleaned up after an Xevent now that the timer is removed- but I haven't observed any problems since a few months ago.
This commit is contained in:
committed by
Carlos R. Mafra
parent
c91bb1ba13
commit
56d8568787
@@ -59,6 +59,7 @@ void
|
||||
Shutdown(WShutdownMode mode)
|
||||
{
|
||||
int i;
|
||||
extern int inotifyFD;
|
||||
|
||||
switch (mode) {
|
||||
case WSLogoutMode:
|
||||
@@ -85,6 +86,7 @@ Shutdown(WShutdownMode mode)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
close(inotifyFD);
|
||||
for (i = 0; i < wScreenCount; i++) {
|
||||
WScreen *scr;
|
||||
|
||||
@@ -115,6 +117,7 @@ Shutdown(WShutdownMode mode)
|
||||
for (i=0; i<wScreenCount; i++) {
|
||||
WScreen *scr;
|
||||
|
||||
close(inotifyFD);
|
||||
scr = wScreenWithNumber(i);
|
||||
if (scr) {
|
||||
if (scr->helper_pid)
|
||||
|
||||
Reference in New Issue
Block a user