Revert "Rewrite the entire internal signal handling/wakeup."
[cubemap] / stream.cpp
index ab08a0f..83257e9 100644 (file)
@@ -31,7 +31,13 @@ Stream::Stream(const string &stream_id, size_t backlog_size, Encoding encoding)
 Stream::~Stream()
 {
        if (data_fd != -1) {
-               safe_close(data_fd);
+               int ret;
+               do {
+                       ret = close(data_fd);
+               } while (ret == -1 && errno == EINTR);
+               if (ret == -1) {
+                       log_perror("close");
+               }
        }
 }