This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit d213ac88875453c6cc8e8b278108fba1d667331a
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Dec 23 13:20:50 2023 +0100
eesh: Fix prompt when command has no reply
---
eesh/main.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/eesh/main.c b/eesh/main.c
index 7587910e..8e295cd8 100644
--- a/eesh/main.c
+++ b/eesh/main.c
@@ -128,7 +128,7 @@ main(int argc, char **argv)
XEvent ev;
Window my_win, comms_win;
Client *me;
- int i;
+ int rc, i;
struct pollfd pfd[2];
int nfd, timeout;
char *command, *s;
@@ -225,7 +225,6 @@ main(int argc, char **argv)
pfd[1].fd = STDIN_FILENO;
pfd[1].events = POLLIN;
nfd = command ? 1 : 2;
- timeout = -1;
for (;;)
{
@@ -265,9 +264,18 @@ main(int argc, char **argv)
#endif
}
- if (poll(pfd, nfd, timeout) < 0)
+ timeout = reply_pending ? 10 : -1;
+
+ rc = poll(pfd, nfd, timeout);
+ if (rc < 0)
break;
+ if (rc == 0)
+ {
+ reply_pending = false;
+ continue;
+ }
+
if (pfd[1].revents)
{
if (pfd[1].revents & POLLIN)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.