From 4e8a81872679c3f01c344451da839523b8640f0f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 28 Dec 2015 20:34:50 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/daemon.h | 1 + src/satd-add.c | 1 + src/satd-diminished.c | 1 - src/satd-list.c | 2 +- src/satd-rm.c | 1 + src/satd-run.c | 1 + src/satd.c | 1 - 7 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/daemon.h b/src/daemon.h index e56fa76..6b968ba 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -20,6 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ #include +#include diff --git a/src/satd-add.c b/src/satd-add.c index f7f2554..e143c00 100644 --- a/src/satd-add.c +++ b/src/satd-add.c @@ -43,6 +43,7 @@ main(int argc, char *argv[]) /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n)); + shutdown(SOCK_FILENO, SHUT_RD); t (n < sizeof(int) + sizeof(clk) + sizeof(ts)); n -= sizeof(int) + sizeof(clk) + sizeof(ts); msg_argc = *(int *)(message + n); diff --git a/src/satd-diminished.c b/src/satd-diminished.c index d9efcf2..3a42fba 100644 --- a/src/satd-diminished.c +++ b/src/satd-diminished.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "daemon.h" diff --git a/src/satd-list.c b/src/satd-list.c index 7cbc2bb..a7d13e3 100644 --- a/src/satd-list.c +++ b/src/satd-list.c @@ -38,10 +38,10 @@ main(int argc, char *argv[]) { size_t n = 0; char *message = NULL; - char **msg_argv = NULL; /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n) || n); + shutdown(SOCK_FILENO, SHUT_RD); return 0; fail: diff --git a/src/satd-rm.c b/src/satd-rm.c index 6c4ed38..6a9f6cd 100644 --- a/src/satd-rm.c +++ b/src/satd-rm.c @@ -42,6 +42,7 @@ main(int argc, char *argv[]) /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n) || !n || message[n - 1]); + shutdown(SOCK_FILENO, SHUT_RD); msg_argv = restore_array(message, n, NULL); t (!msg_argv); diff --git a/src/satd-run.c b/src/satd-run.c index a2679bb..7cccb57 100644 --- a/src/satd-run.c +++ b/src/satd-run.c @@ -42,6 +42,7 @@ main(int argc, char *argv[]) /* Receive and validate message. */ t (readall(SOCK_FILENO, &message, &n) || (n && message[n - 1])); + shutdown(SOCK_FILENO, SHUT_RD); if (n) { msg_argv = restore_array(message, n, NULL); t (!msg_argv); diff --git a/src/satd.c b/src/satd.c index bd927cd..42a2074 100644 --- a/src/satd.c +++ b/src/satd.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include -- cgit v1.2.3-70-g09d2