summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2020-04-21 15:53:38 +0200
committerPaul Wicking <paul.wicking@qt.io>2020-04-24 13:39:29 +0200
commit7cbe7f97ad7585c72b18f786b83122840f7159cc (patch)
tree6b603d5aa0abe0e3c6da04a1b80d4ec8b362ebf3 /doc/src/snippets
parent7e6a846c447ba18526e0c6d0194fa4037174c45a (diff)
Doc: Fix snippet
The field sa_flags of the structure term is not initialized to zero, so SA_RESTART is in OR with whatever value was in the memory. It should be set to zero as already done for the structure hup. Fixes: QTBUG-83686 Change-Id: If4c2b68136fb0cab26af164bbdb461807b11ce70 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/code/doc_src_unix-signal-handlers.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
index f2c2d198a..a0073c5d9 100644
--- a/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
+++ b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
@@ -110,6 +110,7 @@ static int setup_unix_signal_handlers()
term.sa_handler = MyDaemon::termSignalHandler;
sigemptyset(&term.sa_mask);
+ term.sa_flags = 0;
term.sa_flags |= SA_RESTART;
if (sigaction(SIGTERM, &term, 0))