| Index: runtime/bin/file_macos.cc
|
| diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
|
| index b9500a74fee98e52df71be2d6e15badbd5ea72a7..356e10bf5eb0736b76221abc49b6c8cf242bf149 100644
|
| --- a/runtime/bin/file_macos.cc
|
| +++ b/runtime/bin/file_macos.cc
|
| @@ -18,7 +18,7 @@
|
| #include "bin/builtin.h"
|
| #include "bin/fdutils.h"
|
| #include "bin/log.h"
|
| -
|
| +#include "bin/signal_blocker.h"
|
|
|
| namespace dart {
|
| namespace bin {
|
| @@ -66,12 +66,16 @@ bool File::IsClosed() {
|
|
|
| int64_t File::Read(void* buffer, int64_t num_bytes) {
|
| ASSERT(handle_->fd() >= 0);
|
| + // Block profile interrupts while making I/O call.
|
| + ThreadSignalBlocker tsb(SIGPROF);
|
| return TEMP_FAILURE_RETRY(read(handle_->fd(), buffer, num_bytes));
|
| }
|
|
|
|
|
| int64_t File::Write(const void* buffer, int64_t num_bytes) {
|
| ASSERT(handle_->fd() >= 0);
|
| + // Block profile interrupts while making I/O call.
|
| + ThreadSignalBlocker tsb(SIGPROF);
|
| return TEMP_FAILURE_RETRY(write(handle_->fd(), buffer, num_bytes));
|
| }
|
|
|
|
|