Revert "Rewrite the entire internal signal handling/wakeup."
[cubemap] / serverpool.cpp
index e309ab9..fb16682 100644 (file)
@@ -92,7 +92,15 @@ void ServerPool::add_stream_from_serialized(const StreamProto &stream, const vec
 
        // Close and delete any leftovers, if the number of servers was reduced.
        for (size_t i = num_servers; i < data_fds.size(); ++i) {
-               safe_close(data_fds[i]);  // Implicitly deletes the file.
+               int ret;
+               do {
+                       ret = close(data_fds[i]);  // Implicitly deletes the file.
+               } while (ret == -1 && errno == EINTR);
+
+               if (ret == -1) {
+                       log_perror("close");
+                       // Can still continue.
+               }
        }
 }