Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a write error occurs on stdout fd just exits with 1 #737

Closed
ghost opened this issue Mar 4, 2021 · 2 comments · Fixed by #810
Closed

When a write error occurs on stdout fd just exits with 1 #737

ghost opened this issue Mar 4, 2021 · 2 comments · Fixed by #810
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Mar 4, 2021

Describe the bug you encountered:
When a write error occurs on stdout fd just exits with 1

Describe what you expected to happen:
I expected a similar behavior to find eg
find > /dev/full
prints

find: ‘standard output’: No space left on device
find: write error

What version of fd are you using?

fd 8.2.1

Which operating system / distribution are you on?

Linux 5.11.2-arch1-1 x86_64

@ghost ghost added the bug label Mar 4, 2021
@sharkdp
Copy link
Owner

sharkdp commented Mar 14, 2021

Thank you for reporting this!

@sharkdp
Copy link
Owner

sharkdp commented Aug 8, 2021

New behavior:

▶ fd > /dev/full
[fd error]: Could not write to output: No space left on device (os error 28)
▶ echo $?       
1
▶ fd | head -n 2
CHANGELOG.md
CONTRIBUTING.md
▶ echo $?
0

@sharkdp sharkdp added this to the fd 9.x milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant