diff options
-rw-r--r-- | src/daemon.h | 1 | ||||
-rw-r--r-- | src/satd-add.c | 1 | ||||
-rw-r--r-- | src/satd-diminished.c | 1 | ||||
-rw-r--r-- | src/satd-list.c | 2 | ||||
-rw-r--r-- | src/satd-rm.c | 1 | ||||
-rw-r--r-- | src/satd-run.c | 1 | ||||
-rw-r--r-- | 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 <stddef.h> +#include <sys/socket.h> 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 <signal.h> #include <sys/wait.h> #include <sys/stat.h> -#include <sys/socket.h> #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); @@ -24,7 +24,6 @@ #include <pwd.h> #include <fcntl.h> #include <sys/stat.h> -#include <sys/socket.h> #include <sys/un.h> #include <sys/file.h> |