aboutsummaryrefslogtreecommitdiffstats
path: root/src/security.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-18 11:34:36 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-18 11:34:36 +0100
commitb8e63cc966668b1c8e26b97c8e63f7ae65e6bd74 (patch)
tree78772f6cefa273351c4a462156eff2df90dd9895 /src/security.c
parentensure all fds are closed properly + stop the user from ^c:ing the failure sleep (diff)
downloadcerberus-b8e63cc966668b1c8e26b97c8e63f7ae65e6bd74.tar.gz
cerberus-b8e63cc966668b1c8e26b97c8e63f7ae65e6bd74.tar.bz2
cerberus-b8e63cc966668b1c8e26b97c8e63f7ae65e6bd74.tar.xz
doc
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/security.c')
-rw-r--r--src/security.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/security.c b/src/security.c
index ff67d95..fc409b1 100644
--- a/src/security.c
+++ b/src/security.c
@@ -34,9 +34,12 @@
#include "security.h"
-#define close(fd) while (((close)(fd) < 0) && (errno == EINTR))
-
+/**
+ * Called on failure.
+ *
+ * @param str The function that failed.
+ */
static void fail(const char* str)
{
perror(str);