summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
Diffstat (limited to 'input')
-rw-r--r--input/ipc-unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input/ipc-unix.c b/input/ipc-unix.c
index d39623fe4f..94a0b4700b 100644
--- a/input/ipc-unix.c
+++ b/input/ipc-unix.c
@@ -74,7 +74,7 @@ static int ipc_write_str(struct client_arg *client, const char *buf)
if (rc == 0)
return -1;
- if (errno == EBADF) {
+ if (errno == EBADF || errno == ENOTSOCK) {
client->writable = false;
return 0;
}
@@ -325,7 +325,7 @@ static void *ipc_thread(void *p)
}
ipc_un.sun_family = AF_UNIX,
- strncpy(ipc_un.sun_path, arg->path, sizeof(ipc_un.sun_path));
+ strncpy(ipc_un.sun_path, arg->path, sizeof(ipc_un.sun_path) - 1);
unlink(ipc_un.sun_path);