commit d66db6cb9eeacaf866fba7d7b7fa4eb97a793946
parent 5e6ad8b322b70cd1aa7d7d49d5df0c9eb57fdeb2
Author: aabacchus <ben@bvnf.space>
Date: Sun, 13 Mar 2022 02:55:29 +0000
comment about stdio <-> poll problem
stdio buffers, but poll looks on the plain syscalls.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/irC.c b/irC.c
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
else if (rec == 0) /* received FIN */
break;
}
- if (fds[0].revents & POLLIN) {
+ if (fds[0].revents & POLLIN) { /* TODO: stdio doesn't work perfectly with poll */
char *line = NULL;
if (getline(&line, &linelen, stdin) == -1) {
shutdown(sfd, SHUT_WR);