Index: third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc |
diff --git a/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc b/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc |
index 973f0a5d503df575e3f0b24f3397abc3e6a5168e..c781e4c6f2233a4b2049883285cfd2967d399545 100644 |
--- a/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc |
+++ b/third_party/crashpad/crashpad/util/synchronization/semaphore_posix.cc |
@@ -39,6 +39,12 @@ void Semaphore::Wait() { |
bool Semaphore::TimedWait(double seconds) { |
DCHECK_GE(seconds, 0.0); |
+ |
+ if (std::isinf(seconds)) { |
+ Wait(); |
+ return true; |
+ } |
+ |
timespec timeout; |
timeout.tv_sec = seconds; |
timeout.tv_nsec = (seconds - trunc(seconds)) * 1E9; |