Skip to content

Commit d4e976d

Browse files
authored
Merge pull request #355 from akhilerm/return-error-from-inotify
add InotifyInit err to custom err message
2 parents 082af38 + 05bb490 commit d4e976d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cgroup2/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ func (c *Manager) MemoryEventFD() (int, uint32, error) {
716716
fpath := filepath.Join(c.path, "memory.events")
717717
fd, err := unix.InotifyInit()
718718
if err != nil {
719-
return 0, 0, errors.New("failed to create inotify fd")
719+
return 0, 0, fmt.Errorf("failed to create inotify fd: %w", err)
720720
}
721721
wd, err := unix.InotifyAddWatch(fd, fpath, unix.IN_MODIFY)
722722
if err != nil {

0 commit comments

Comments
 (0)