From Jérôme Duval <jerome.duval@xxxxxxxxx>:
Jérôme Duval has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/3727 ;)
Change subject: poorman: handle EINTR on poll()
......................................................................
poorman: handle EINTR on poll()
---
M src/apps/poorman/PoorManServer.cpp
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/27/3727/1
diff --git a/src/apps/poorman/PoorManServer.cpp
b/src/apps/poorman/PoorManServer.cpp
index 0b53dd8..357e7ac 100644
--- a/src/apps/poorman/PoorManServer.cpp
+++ b/src/apps/poorman/PoorManServer.cpp
@@ -8,6 +8,7 @@
#include "PoorManServer.h"
+#include <errno.h>
#include <pthread.h>
#include <string.h>
#include <stdlib.h>
@@ -226,6 +227,8 @@
while (s->fIsRunning) {
// Wait for listen4_fd or listen6_fd (or both!) to become ready:
retval = poll(fds, nfds, -1);
+ if (retval == -1 && errno == EINTR)
+ continue;
if (retval < 1) {
return -1; // fds no longer available
}
--
To view, visit https://review.haiku-os.org/c/haiku/+/3727
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I549db55a408063bbddf71d5ce15c0286bf36bc69
Gerrit-Change-Number: 3727
Gerrit-PatchSet: 1
Gerrit-Owner: Jérôme Duval <jerome.duval@xxxxxxxxx>
Gerrit-MessageType: newchange