aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt3
-rw-r--r--pseudo_server.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index a6e4c79..ae27a6a 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2018-02-16:
+ * (seebs) allow closing client #0.
+
2018-02-15:
* (seebs) O_TMPFILE is actually some other flag AND O_DIRECTORYy,
so a test for (flags & O_TMPFILE) does not actually test that
diff --git a/pseudo_server.c b/pseudo_server.c
index dac3258..c12ba9b 100644
--- a/pseudo_server.c
+++ b/pseudo_server.c
@@ -449,7 +449,7 @@ close_client(int client) {
pseudo_debug(PDBGF_SERVER, "lost client %d [%d], closing fd %d\n", client,
clients[client].pid, clients[client].fd);
/* client went away... */
- if (client > highest_client || client <= 0) {
+ if (client > highest_client || client < 0) {
pseudo_diag("tried to close client %d (highest is %d)\n",
client, highest_client);
return;