Skip to content

Commit

Permalink
Check for EINTR with != on Linux (#56)
Browse files Browse the repository at this point in the history
This way, ignoringEINTR becomes small enough for Go 1.16 to inline it.

Co-authored-by: greatroar <@>
  • Loading branch information
greatroar authored Apr 6, 2021
1 parent 5e1af12 commit 8725d4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xattr_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package xattr

import (
"errors"
"os"
"syscall"

Expand Down Expand Up @@ -31,7 +30,7 @@ const (
func ignoringEINTR(fn func() error) (err error) {
for {
err = fn()
if !errors.Is(err, unix.EINTR) {
if err != unix.EINTR {
break
}
}
Expand Down

0 comments on commit 8725d4c

Please sign in to comment.