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

Sync on linux: /dev/stdout: invalid argument #772

Closed
benbarbour opened this issue Dec 11, 2019 · 3 comments
Closed

Sync on linux: /dev/stdout: invalid argument #772

benbarbour opened this issue Dec 11, 2019 · 3 comments

Comments

@benbarbour
Copy link

benbarbour commented Dec 11, 2019

I'm seeing this every time I call .Sync() on linux (Ubuntu 18.04.3) when writing to stdout or stderr. Specifically, I'm getting an *os.PathError with the message "sync /dev/stdout: invalid argument". Should I open a new bug?

Looks a lot like #328, but I don't see a mention of a PathError there, so I opened a new bug.

@prashantv
Copy link
Collaborator

This is related to #370 -- the console driver does not support fsync, hence the errors.

We don't want to ignore all errors for stdout/stderr, since they may be attached to a file which does support fsync, in which case any error would be a real error we shouldn't ignore

Detecting terminals won't work because it can happen in other cases too (e.g., pipes).

Perhaps we can ignore EINVAL in zap.

@benbarbour
Copy link
Author

Ok, so it is the same bug. This can probably be closed then.

Maybe I'll just ignore that exact os.PathError (for /dev/std*) in my code for now.

@prashantv
Copy link
Collaborator

Closing as suggested, but open to ideas around ignoring EINVAL for stdout/stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants