Skip to content

Commit

Permalink
pull-in mhetzi's fixes when trying to open named fifos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed May 3, 2024
2 parents 06090c5 + 18cde7f commit d511e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func work(p string) error {
decrementCurrentlyWorkingWorkers()
}()

f, err := os.OpenFile(p, os.O_RDONLY|syscall.O_NOFOLLOW, 0)
f, err := os.OpenFile(p, os.O_RDONLY|syscall.O_NOFOLLOW|syscall.O_NONBLOCK, 0)
if err != nil {
if errors.Is(err, syscall.ELOOP) {
return nil // this is O_NOFOLLOW result, we tried to open a symlink, ignore
Expand Down

0 comments on commit d511e1e

Please sign in to comment.