[vte] pty: Skip SIGKILL and SIGSTOP



commit 1867c0f7aa10b2d8e09fb676fd6c684fe619485e
Author: Christian Persch <chpe gnome org>
Date:   Sat Dec 12 17:23:41 2015 +0100

    pty: Skip SIGKILL and SIGSTOP

 src/pty.cc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/pty.cc b/src/pty.cc
index deabf7c..1ab1b54 100644
--- a/src/pty.cc
+++ b/src/pty.cc
@@ -139,8 +139,12 @@ vte_pty_child_setup (VtePty *pty)
 
         /* Reset the handlers for all signals to their defaults.  The parent
          * (or one of the libraries it links to) may have changed one to be ignored. */
-        for (int n = 1; n < NSIG; n++)
+        for (int n = 1; n < NSIG; n++) {
+                if (n == SIGSTOP || n == SIGKILL)
+                        continue;
+
                 signal(n, SIG_DFL);
+        }
 
         int masterfd = priv->pty_fd;
         if (masterfd == -1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]