Skip to content

Commit e91481e

Browse files
authored
Merge pull request #262 from dcantah/cg2-noretry-eintr
cgroup2: Don't retry on EINTR
2 parents dd9a65f + 2b3be83 commit e91481e

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

cgroup2/manager.go

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,11 @@ func (c *Value) write(path string, perm os.FileMode) error {
144144
return ErrInvalidFormat
145145
}
146146

147-
// Retry writes on EINTR; see:
148-
// https://github.com/golang/go/issues/38033
149-
for {
150-
err := os.WriteFile(
151-
filepath.Join(path, c.filename),
152-
data,
153-
perm,
154-
)
155-
if err == nil {
156-
return nil
157-
} else if !errors.Is(err, syscall.EINTR) {
158-
return err
159-
}
160-
}
147+
return os.WriteFile(
148+
filepath.Join(path, c.filename),
149+
data,
150+
perm,
151+
)
161152
}
162153

163154
func writeValues(path string, values []Value) error {

0 commit comments

Comments
 (0)