diff options
| author | Mattias Andrée <maandree@operamail.com> | 2015-09-11 05:49:40 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2015-09-11 05:49:40 +0200 |
| commit | 6c9a04cf36de40da05508d42d1c78a16b62775fa (patch) | |
| tree | da66ed50aea79ba575ec1e97533379ce1fcf00b7 /src/security.c | |
| parent | m makefile (diff) | |
| download | cerberus-6c9a04cf36de40da05508d42d1c78a16b62775fa.tar.gz cerberus-6c9a04cf36de40da05508d42d1c78a16b62775fa.tar.bz2 cerberus-6c9a04cf36de40da05508d42d1c78a16b62775fa.tar.xz | |
ensure all fds are closed properly + stop the user from ^c:ing the failure sleep1441943433
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/security.c')
| -rw-r--r-- | src/security.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/security.c b/src/security.c index 180e2f3..ff67d95 100644 --- a/src/security.c +++ b/src/security.c @@ -23,6 +23,7 @@ #include <fcntl.h> #include <signal.h> #include <stropts.h> +#include <errno.h> #if defined(OWN_VCSA) || defined(OWN_VCS) #include <string.h> #include <linux/vt.h> @@ -33,6 +34,9 @@ #include "security.h" +#define close(fd) while (((close)(fd) < 0) && (errno == EINTR)) + + static void fail(const char* str) { perror(str); |
