all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob ca9b5a04d299e32e5ba7f4b4fce06c1447114a00 1264 bytes (raw)
name: gnu/packages/patches/linphoneqt-socket.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
From 9cf08623e3092fa19366e5c07fbe06898a59f039 Mon Sep 17 00:00:00 2001
From: Ronan Abhamon <ronan.abhamon@belledonne-communications.com>
Date: Fri, 26 Jan 2018 11:45:53 +0100
Subject: [PATCH] feat(SingleApplication): don't touch sockets when SIGABRT,
 SIGBUS or SIGSEGV is handled

---
 src/app/single-application/SingleApplication.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/app/single-application/SingleApplication.cpp b/src/app/single-application/SingleApplication.cpp
index d64903ba..b42285b5 100644
--- a/src/app/single-application/SingleApplication.cpp
+++ b/src/app/single-application/SingleApplication.cpp
@@ -256,11 +256,21 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType)
       return;
     }
 
+    // Dangerous signals. Exit directly after shared memory destruction.
+    // Don't touch sockets => avoid dead locks.
+    for (int crashSig : { SIGABRT, SIGBUS, SIGSEGV })
+      if (signum == crashSig) {
+        for (SingleApplicationPrivate *d : sharedMem)
+          delete d->memory;
+        goto forceExit;
+      }
+
     while (!sharedMem.empty()) {
       delete sharedMem.back();
       sharedMem.pop_back();
     }
 
+  forceExit:
     ::exit(128 + signum);
   }
 
-- 
2.21.0


debug log:

solving ca9b5a04d2 ...
found ca9b5a04d2 in https://yhetil.org/guix/48c4a04dff5589ada795e823ed045dee@disroot.org/

applying [1/1] https://yhetil.org/guix/48c4a04dff5589ada795e823ed045dee@disroot.org/
diff --git a/gnu/packages/patches/linphoneqt-socket.patch b/gnu/packages/patches/linphoneqt-socket.patch
new file mode 100644
index 0000000000..ca9b5a04d2

1:24: trailing whitespace.
 
1:38: trailing whitespace.
 
1:42: trailing whitespace.
 
1:43: trailing whitespace.
-- 
Checking patch gnu/packages/patches/linphoneqt-socket.patch...
1:45: new blank line at EOF.
+
Applied patch gnu/packages/patches/linphoneqt-socket.patch cleanly.
warning: 5 lines add whitespace errors.

index at:
100644 ca9b5a04d299e32e5ba7f4b4fce06c1447114a00	gnu/packages/patches/linphoneqt-socket.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.