commit 6d34a8a7d17e5c99c4360e5b921c5d746876ba72
parent c541e89831fc9acdac8115454d2923f0fa820fdb
Author: sin <sin@2f30.org>
Date: Sun, 28 Dec 2014 21:57:09 +0000
Implement cmdclose()
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/cmd.c b/cmd.c
@@ -268,7 +268,14 @@ cmdlearn(int fd, char *arg)
static void
cmdclose(int fd, char *arg)
-{
+{ if (arg[0]) {
+ dprintf(fd, "ERR unexpected argument\n");
+ return;
+ }
+
+ dprintf(fd, "OK\n");
+ FD_CLR(fd, &master);
+ close(fd);
}
static void