Introduction
Introduction Statistics Contact Development Disclaimer Help
lchat: ignore poll errors on interupts - lchat - A line oriented chat front end…
git clone git://git.suckless.org/lchat
Log
Files
Refs
README
---
commit 5d78aec7398254c86ce90cb53d750af437f12a75
parent eaaf97e1cfa06ef15e4e8a3dbf03b7efd443c8cd
Author: Jan Klemkow <[email protected]>
Date: Wed, 22 Feb 2017 18:04:00 +0100
lchat: ignore poll errors on interupts
Diffstat:
M lchat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/lchat.c b/lchat.c
@@ -279,7 +279,8 @@ main(int argc, char *argv[])
fputs(prompt, stdout);
for (;;) {
- if (poll(pfd, 2, INFTIM) == -1)
+ errno = 0;
+ if (poll(pfd, 2, INFTIM) == -1 && errno != EINTR)
err(EXIT_FAILURE, "poll");
/* moves cursor back after linewrap */
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.