--- ./src/fluxbox.cc.org 2016-10-20 09:52:42.067933174 +0200 +++ ./src/fluxbox.cc 2016-10-20 15:16:33.565662735 +0200 @@ -1064,8 +1064,8 @@ /// restarts fluxbox void Fluxbox::restart(const char *prog) { - shutdown(); m_state.restarting = true; + shutdown(); if (prog && *prog != '\0') { m_restart_argument = prog; @@ -1087,7 +1087,8 @@ // give ourself 2 seconds (randomly picked randon number) to shutdown // and then try to reenter signal handling. a bad race condition might // lead to an inifite loop and this is some kind of last resort - alarm(2); + if (!m_state.restarting) + alarm(2); #endif XSetInputFocus(dpy, PointerRoot, None, CurrentTime);