From b8ec1d5f49ec5f9350f2b0bd99560e4aadfcb70c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 30 Sep 2020 17:37:24 -0700 Subject: internal/poll: use ignoringEINTR in Darwin Fsync Also add comment explaining why we don't use ignoringEINTR around call to close. Fixes #41115 Change-Id: Ia7bbe01eaf26003f70d184b7e82803efef2b2c18 Reviewed-on: https://go-review.googlesource.com/c/go/+/258542 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills --- src/internal/poll/fd_fsync_darwin.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/internal/poll/fd_fsync_darwin.go') diff --git a/src/internal/poll/fd_fsync_darwin.go b/src/internal/poll/fd_fsync_darwin.go index 91751496a4..48e7596922 100644 --- a/src/internal/poll/fd_fsync_darwin.go +++ b/src/internal/poll/fd_fsync_darwin.go @@ -14,7 +14,8 @@ func (fd *FD) Fsync() error { return err } defer fd.decref() - - _, e1 := fcntl(fd.Sysfd, syscall.F_FULLFSYNC, 0) - return e1 + return ignoringEINTR(func() error { + _, err := fcntl(fd.Sysfd, syscall.F_FULLFSYNC, 0) + return err + }) } -- cgit v1.3-5-g9baa