[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH xorg-gtest 09/11] xserver: ignore SIGUSR1 in the parent after server startup
From:       Peter Hutterer <peter.hutterer () who-t ! net>
Date:       2012-10-30 1:38:31
Message-ID: 1351561113-23391-9-git-send-email-peter.hutterer () who-t ! net
[Download RAW message or body]

SIGUSR1 is triggered on server regeneration too, not just on startup. And
any test that wants to handle SIGUSR1 for other stuff needs to set a signal
handler anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 src/xserver.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/xserver.cpp b/src/xserver.cpp
index 0c8f342..ad018a1 100644
--- a/src/xserver.cpp
+++ b/src/xserver.cpp
@@ -489,6 +489,10 @@ void xorg::testing::XServer::Start(const std::string &program) {
   sigaddset(&sig_mask, SIGUSR1);
   sigprocmask(SIG_UNBLOCK, &sig_mask, NULL);
 
+  /* Ignore SIGUSR1, it's triggered on server regeneration. Tests that need
+   * to handle SIGUSR1 will have to install their own signal handler anyways */
+  signal(SIGUSR1 ,SIG_IGN);
+
   RegisterXIOErrorHandler();
 }
 
-- 
1.7.11.7

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic