luad

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 3e8640e54f5515974675d1ccc1e92d06f94d831d
parent 12c7abd3b0299395bb5071cf9313cf45ac896cdb
Author: Daniel Barlow <dan@telent.net>
Date:   Mon,  1 Jun 2026 14:40:51 +0100

swap pollfds order

Diffstat:
Mluad.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/luad.c b/luad.c @@ -244,12 +244,12 @@ int main(int argc, char **argv) struct pollfd pollfds[2] = { { - .fd = socket, + .fd = sigpipe_fds[0], .events = POLLIN, .revents = 0 }, { - .fd = sigpipe_fds[0], + .fd = socket, .events = POLLIN, .revents = 0 }, @@ -259,7 +259,7 @@ int main(int argc, char **argv) if(poll(pollfds, 2, 10000) == 0) continue; - if(pollfds[0].revents) { + if(pollfds[1].revents) { if(find_peer(0)) { int len = recvmsg(socket, &msg , 0); if(len <= 0) continue; @@ -286,7 +286,7 @@ int main(int argc, char **argv) } } - if(pollfds[1].revents) { + if(pollfds[0].revents) { pid_t pid; int wstatus;