fluxbox/src
Mathias Gumz 43bdf499d5 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*
2014-02-18 19:34:35 +01:00
..
FbTk Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
tests Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
AlphaMenu.cc renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
AlphaMenu.hh renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
ArrowButton.cc added FbTk::Util::clamp() and simplified related code 2010-09-09 15:31:54 +02:00
ArrowButton.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
AtomHandler.hh code simplification 2010-09-13 22:04:24 +02:00
AttentionNoticeHandler.cc changed timing functions to use a monotonic increasing clock 2012-08-28 10:51:55 +02:00
AttentionNoticeHandler.hh Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
ButtonTheme.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
ButtonTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
ButtonTool.cc bugfix: consistent use of 'int' for alpha values (#3187373) 2011-02-22 22:07:39 +01:00
ButtonTool.hh bugfix: consistent use of 'int' for alpha values (#3187373) 2011-02-22 22:07:39 +01:00
CascadePlacement.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
CascadePlacement.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
cli.hh Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
cli_cfiles.cc Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
cli_info.cc Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
cli_options.cc Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
ClientMenu.cc Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
ClientMenu.hh Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
ClientPattern.cc add fullscreen, maximizedhorizontal, and maximizedvertical tests to ClientPattern 2012-07-01 21:22:01 -07:00
ClientPattern.hh Adds 'ClientPatternTest' command 2013-01-31 09:14:06 +01:00
ClockTool.cc Trigger ClockTool every second, independent of the format string 2013-02-14 19:58:28 +01:00
ClockTool.hh Trigger ClockTool every second, independent of the format string 2013-02-14 19:58:28 +01:00
ColSmartPlacement.cc cosmetic 2010-09-08 22:31:41 +02:00
ColSmartPlacement.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
CommandDialog.cc Make RefCount<> more sensible 2011-05-10 13:00:45 +02:00
CommandDialog.hh add SetTitle and SetTitleDialog key commands 2008-08-17 04:10:17 -07:00
CurrentWindowCmd.cc Add support for nearest corner or edge resizing 2012-10-04 09:36:23 +02:00
CurrentWindowCmd.hh Add support for nearest corner or edge resizing 2012-10-04 09:36:23 +02:00
Debug.hh Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
Ewmh.cc Use _NET_WM_ICON from 32bit apps (xfce4-terminal) correctly 2011-08-11 09:48:08 +02:00
Ewmh.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
FbAtoms.cc Add mwm _MOTIF_WM_INFO atom to advertise mwm hints capability 2012-01-04 07:45:20 +01:00
FbAtoms.hh Add mwm _MOTIF_WM_INFO atom to advertise mwm hints capability 2012-01-04 07:45:20 +01:00
FbCommands.cc Adds 'ClientPatternTest' command 2013-01-31 09:14:06 +01:00
FbCommands.hh Adds 'ClientPatternTest' command 2013-01-31 09:14:06 +01:00
FbMenu.cc Set WM_WINDOW_ROLE for fluxbox windows 2012-12-30 12:27:43 +01:00
FbMenu.hh renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
FbMenuParser.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
FbMenuParser.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
FbRootWindow.cc Added support for ARGB visual, patch #3284774 2011-10-20 09:41:55 +02:00
FbRootWindow.hh Added support for ARGB visual, patch #3284774 2011-10-20 09:41:55 +02:00
FbWinFrame.cc Adds the OnTab keyword for the keys file 2012-11-07 09:41:49 +01:00
FbWinFrame.hh Adds the OnTab keyword for the keys file 2012-11-07 09:41:49 +01:00
FbWinFrameTheme.cc added FbTk::Util::clamp() and simplified related code 2010-09-09 15:31:54 +02:00
FbWinFrameTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
fluxbox.cc Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
fluxbox.hh Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
Focusable.hh make alt-tab skip modal windows 2012-07-06 19:30:39 -07:00
FocusableList.cc FocusableList.cc,.hh: Pass string arguments by const reference. 2012-01-04 07:55:44 +01:00
FocusableList.hh FocusableList.cc,.hh: Pass string arguments by const reference. 2012-01-04 07:55:44 +01:00
FocusableTheme.hh Remove all trace of Observers and Subjects 2011-05-10 13:00:46 +02:00
FocusControl.cc Fixed lost focus glitch on multihead-ws-warping 2012-11-25 08:29:41 +01:00
FocusControl.hh Added option for focus revert to stay on current head 2012-11-20 08:04:50 +01:00
FocusModelMenuItem.hh add selection box to various "choose one of these" menu items 2008-08-03 21:59:14 -07:00
GenericTool.cc Convert FbTk::Theme::reconfigSig and friends to the new Signal system 2011-05-10 13:00:45 +02:00
GenericTool.hh Convert FbTk::Theme::reconfigSig and friends to the new Signal system 2011-05-10 13:00:45 +02:00
HeadArea.cc updated copyright info 2006-02-16 06:53:05 +00:00
HeadArea.hh removed some unneeded headers 2007-12-30 16:32:53 +01:00
IconbarTheme.cc added new ThemeProxy for automatically handling focused vs. unfocused ThemeItems 2008-01-07 02:26:32 -08:00
IconbarTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
IconbarTool.cc Convert Focusable::orderSig,addSig,removeSig,resetSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
IconbarTool.hh Convert Focusable::orderSig,addSig,removeSig,resetSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
IconButton.cc Convert Focusable::attentionSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
IconButton.hh Convert Focusable::attentionSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Keys.cc Fix lost keypresses after workspace change (#1067) 2013-08-02 08:46:45 +02:00
Keys.hh Use RefCount to store keybindings 2011-09-14 19:39:11 +02:00
Layer.hh compile fix: sunCC 5.11 (sunstudio 12) compiles and links again 2011-03-23 12:02:15 +01:00
LayerMenu.cc compile fix: sunCC 5.11 (sunstudio 12) compiles and links again 2011-03-23 12:02:15 +01:00
LayerMenu.hh renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
main.cc Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
Makefile.am Fix race condition on shutdown 2014-02-18 19:34:35 +01:00
MenuCreator.cc refactored MenuCreator 2011-10-21 08:42:48 +02:00
MenuCreator.hh refactored MenuCreator 2011-10-21 08:42:48 +02:00
MinOverlapPlacement.cc code cleanup: moved code from public API to implementation 2011-03-19 19:29:43 +01:00
MinOverlapPlacement.hh code cleanup: moved code from public API to implementation 2011-03-19 19:29:43 +01:00
OSDWindow.cc introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
OSDWindow.hh introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
PlacementStrategy.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
RectangleUtil.hh Use shared code, minor code simplification 2013-05-23 09:18:37 +02:00
Remember.cc Remove unused variables, cosmetics 2013-02-10 12:21:29 +01:00
Remember.hh allow to override 'FocusNewWindow' via .fluxbox/apps 2011-02-03 18:51:10 +01:00
Resources.cc Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebar 2013-02-06 13:47:17 +01:00
RootCmdMenuItem.cc make FbTk::Command a template class, split parsing information out of ObjectRegistry 2008-01-10 23:41:22 -08:00
RootCmdMenuItem.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
RootTheme.cc RootTheme.cc: Obey HAVE_SYS_WAIT_H 2011-10-31 10:42:08 -05:00
RootTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
RowSmartPlacement.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
RowSmartPlacement.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
Screen.cc Fix lost keypresses after workspace change (#1067) 2013-08-02 08:46:45 +02:00
Screen.hh Allow percentage values for some Window commands 2012-04-06 14:11:16 +02:00
ScreenPlacement.cc Exceptions should be caught by reference. 2012-01-04 07:51:35 +01:00
ScreenPlacement.hh code cleanup: moved code from public API to implementation 2011-03-19 19:29:43 +01:00
SendToMenu.cc Remove all trace of Observers and Subjects 2011-05-10 13:00:46 +02:00
SendToMenu.hh Remove all trace of Observers and Subjects 2011-05-10 13:00:46 +02:00
Slit.cc Set WM_WINDOW_ROLE for fluxbox windows 2012-12-30 12:27:43 +01:00
Slit.hh Convert Screen::reconfigureSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
SlitClient.cc introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
SlitClient.hh introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
SlitTheme.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
SlitTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
Strut.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
StyleMenuItem.cc add selection box to various "choose one of these" menu items 2008-08-03 21:59:14 -07:00
StyleMenuItem.hh add selection box to various "choose one of these" menu items 2008-08-03 21:59:14 -07:00
SystemTray.cc Convert ToolbarItem::resizeSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
SystemTray.hh Convert FbTk::Theme::reconfigSig and friends to the new Signal system 2011-05-10 13:00:45 +02:00
TextDialog.cc Set WM_WINDOW_ROLE for fluxbox windows 2012-12-30 12:27:43 +01:00
TextDialog.hh introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
ToggleMenu.hh renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
Toolbar.cc minor code simplifications 2013-02-27 09:50:29 +01:00
Toolbar.hh Convert ToolbarItem::resizeSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
ToolbarItem.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
ToolbarItem.hh Convert ToolbarItem::resizeSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
ToolbarTheme.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
ToolbarTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
ToolFactory.cc minor code simplifications 2013-02-27 09:50:29 +01:00
ToolFactory.hh cosmetic fixes: removed redundant ';' + some whitespaces 2009-09-30 21:02:24 +02:00
ToolTheme.cc add a level of indirection to themes 2008-01-04 01:06:38 -08:00
ToolTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
TooltipWindow.cc changed timing functions to use a monotonic increasing clock 2012-08-28 10:51:55 +02:00
TooltipWindow.hh changed timing functions to use a monotonic increasing clock 2012-08-28 10:51:55 +02:00
UnderMousePlacement.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
UnderMousePlacement.hh remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
WinButton.cc Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebar 2013-02-06 13:47:17 +01:00
WinButton.hh Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebar 2013-02-06 13:47:17 +01:00
WinButtonTheme.cc Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebar 2013-02-06 13:47:17 +01:00
WinButtonTheme.hh Feature #3602124: 'LHalf' and 'RHalf' buttons to the titlebar 2013-02-06 13:47:17 +01:00
WinClient.cc Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
WinClient.hh Can check CARDINAL properties in CLIENT PATTERNS 2011-05-08 07:48:03 +02:00
Window.cc more compact code 2013-05-23 09:19:34 +02:00
Window.hh Add support for nearest corner or edge resizing 2012-10-04 09:36:23 +02:00
WindowCmd.cc remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
WindowCmd.hh more more fun with the window menu 2008-05-28 02:32:57 -07:00
WindowMenuAccessor.hh bugfix: consistent use of 'int' for alpha values (#3187373) 2011-02-22 22:07:39 +01:00
WindowState.cc minor cleanup 2010-09-09 15:33:34 +02:00
WindowState.hh make the menu bit of decoration masks control whether or not menu button is shown on window (it did nothing before) 2012-07-08 17:56:26 -07:00
Workspace.cc better solution for warping transient windows 2011-02-24 16:55:55 +01:00
Workspace.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
WorkspaceCmd.cc Fix ArrangeWindowsStack* for multi-head displays 2013-08-02 11:19:26 +02:00
WorkspaceCmd.hh Add support for stacked tiling via ArrangeWindows* 2013-08-02 08:56:07 +02:00
WorkspaceMenu.cc compile fix: sunCC 5.11 (sunstudio 12) compiles and links again 2011-03-23 12:02:15 +01:00
WorkspaceMenu.hh Changed workspace names signal in BScreen to use the new signal system 2008-09-21 15:25:47 +02:00
WorkspaceNameTheme.hh Last round of simplification of Signal/Slot classes 2011-05-10 13:00:45 +02:00
WorkspaceNameTool.cc Pre-increment non-primitive types. 2012-01-04 07:53:54 +01:00
WorkspaceNameTool.hh Convert FbTk::Theme::reconfigSig and friends to the new Signal system 2011-05-10 13:00:45 +02:00
Xinerama.hh renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
Xutil.cc introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00
Xutil.hh introduced FbTk::BidiString 2010-09-08 20:17:21 +02:00