aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn D. Baker <jdbaker@consolidated.net>2023-06-18 18:11:31 (GMT)
committerMathias Gumz <mg@2hoch5.com>2023-06-18 18:11:31 (GMT)
commit9e5c521e13cc6d881c3cedda8bd9f387db0e4399 (patch)
tree703857beaa3bb07e5c6f56ca948312460984aab1
parent9d8202f32338a3f08d3fa39057dc5eec5d97be4e (diff)
downloadfluxbox-fix/dont-deliver-sigalarm.zip
fluxbox-fix/dont-deliver-sigalarm.tar.bz2
Disable SIGALRM before launching other WMsfix/dont-deliver-sigalarm
Via 43bdf499, `alarm(2)` might get issued which might trigger a SIGALRM in some edge cases in a shutdown / restart scenario. In case of a restart-to-other-WM scenario, this will yield a SIGALRM in the other WM which then might fail because no SIGALRM handler is installed. This commit addresses the issue by disabling any alarm to our own instance before launching the other WM.
-rw-r--r--src/main.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 574020a..8d78325 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -266,6 +266,7 @@ int main(int argc, char **argv) {
266 FbTk::FbStringUtil::shutdown(); 266 FbTk::FbStringUtil::shutdown();
267 267
268 if (restarting) { 268 if (restarting) {
269 alarm(0);
269 if (!restart_argument.empty()) { 270 if (!restart_argument.empty()) {
270 const char *shell = getenv("SHELL"); 271 const char *shell = getenv("SHELL");
271 if (!shell) 272 if (!shell)