aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2014-02-18 18:34:35 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2014-02-18 18:34:35 (GMT)
commit43bdf499d56c09a520dc3bc03438dee4092d3d58 (patch)
treefc08fe113eb7c577eb402bf9ffebd8038d4f90da /src/Makefile.am
parent3696562aa87c7e68cb8b00b85f0e8d5cf2d199bf (diff)
downloadfluxbox-43bdf499d56c09a520dc3bc03438dee4092d3d58.zip
fluxbox-43bdf499d56c09a520dc3bc03438dee4092d3d58.tar.bz2
Fix race condition on shutdown
This commit fixes primarily a race condition that occurs when xinit(1) shuts down: by not acting properly fluxbox gets caught in an infinite loop. It caused bug #1100. xinit(1) sends a SIGHUP signal to all processes. fluxbox tries to shutdown itself properly by shutting down workspaces and screens. While doing that, the Xserver might be gone already. Additionally, fluxbox used to restart() itself on SIGHUP, which is clearly not the right thing to do when xinit(1) is about to end the session. So, fluxbox does this: * handling SIGHUP now shuts down fluxbox without clearing workspaces and screens. * A 2 second alarm() is triggered in Fluxbox::shutdown() as a last resort * XSetIOErrorHandler() is used to recognize the disconnect from the xserver. * SIGUSR1 is for restarting fluxbox, SIGUSR2 for reloading the config * FbTk/SignalHandler.cc/hh is gone; this unused abstraction served currently no real purpose. Signal handling is now done in main.cc * Unrelated to the issue itself src/main.cc was trimmed down quite a bit and the code (responsible for handling the command line interface) was moved to src/cli*
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 257bdbb..eb5ab04 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,6 +54,7 @@ defaults.hh: Makefile
54 echo '#else'; \ 54 echo '#else'; \
55 echo '#define PATHPREFIX'; \ 55 echo '#define PATHPREFIX'; \
56 echo '#endif'; \ 56 echo '#endif'; \
57 echo '#define CONFIG_VERSION 13'; \
57 echo '#define DEFAULTMENU PATHPREFIX "$(DEFAULT_MENU)"'; \ 58 echo '#define DEFAULTMENU PATHPREFIX "$(DEFAULT_MENU)"'; \
58 echo '#define DEFAULTSTYLE PATHPREFIX "$(DEFAULT_STYLE)"'; \ 59 echo '#define DEFAULTSTYLE PATHPREFIX "$(DEFAULT_STYLE)"'; \
59 echo '#define DEFAULTKEYSFILE PATHPREFIX "$(DEFAULT_KEYSFILE)"'; \ 60 echo '#define DEFAULTKEYSFILE PATHPREFIX "$(DEFAULT_KEYSFILE)"'; \
@@ -123,7 +124,9 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \
123 FbAtoms.hh FbAtoms.cc FbWinFrame.hh FbWinFrame.cc \ 124 FbAtoms.hh FbAtoms.cc FbWinFrame.hh FbWinFrame.cc \
124 FbWinFrameTheme.hh FbWinFrameTheme.cc \ 125 FbWinFrameTheme.hh FbWinFrameTheme.cc \
125 fluxbox.cc fluxbox.hh \ 126 fluxbox.cc fluxbox.hh \
126 Keys.cc Keys.hh main.cc \ 127 Keys.cc Keys.hh \
128 main.cc \
129 cli.hh cli_cfiles.cc cli_options.cc cli_info.cc \
127 RootTheme.hh RootTheme.cc \ 130 RootTheme.hh RootTheme.cc \
128 FbRootWindow.hh FbRootWindow.cc \ 131 FbRootWindow.hh FbRootWindow.cc \
129 OSDWindow.hh OSDWindow.cc \ 132 OSDWindow.hh OSDWindow.cc \