summaryrefslogtreecommitdiff
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-30 15:07:43 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-01 12:41:17 +0100
commite28c7cd0665364bb910fe2cead882623c23c28ac (patch)
tree7ec5121edaf9a14ddca59385bb7e3e817f7092be /CODING_STYLE
parent7b4318b6a51e996fcd17855bbef21f8ad3c08da9 (diff)
tree-wide: set SA_RESTART for signal handlers we install
We already set it in most cases, but make sure to set it in all others too, and document that that's a good idea.
Diffstat (limited to 'CODING_STYLE')
-rw-r--r--CODING_STYLE5
1 files changed, 5 insertions, 0 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index e89b3c67e5..ed61ea9d28 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -429,3 +429,8 @@
and Linux/GNU-specific APIs, we generally prefer the POSIX APIs. If there
aren't, we are happy to use GNU or Linux APIs, and expect non-GNU
implementations of libc to catch up with glibc.
+
+- Whenever installing a signal handler, make sure to set SA_RESTART for it, so
+ that interrupted system calls are automatically restarted, and we minimize
+ hassles with handling EINTR (in particular as EINTR handling is pretty broken
+ on Linux).