aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-08 10:03:29 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-08 10:03:29 +0200
commitd834d6e07439a8025e343afefbdfe3976bfa784f (patch)
treea6ec168a7d47f4772d6abe5376a4335e900baeb6
parent11716825fcf219349a7a3952e75688d167318714 (diff)
downloadminetest-d834d6e07439a8025e343afefbdfe3976bfa784f.tar.gz
minetest-d834d6e07439a8025e343afefbdfe3976bfa784f.tar.bz2
minetest-d834d6e07439a8025e343afefbdfe3976bfa784f.zip
Handle select errno EINTR properly (not doing this breaks at least many profilers)
-rw-r--r--src/socket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 6d48178f9..7b70d4295 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -331,6 +331,9 @@ bool UDPSocket::WaitData(int timeout_ms)
<<timeout_ms<<")"<<std::endl;*/
return false;
}
+ else if(result < 0 && errno == EINTR){
+ return false;
+ }
else if(result < 0){
// Error
#ifndef DISABLE_ERRNO