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

os: File.Sync should return *PathError on Plan 9 #39800

Closed
fhs opened this issue Jun 24, 2020 · 2 comments
Closed

os: File.Sync should return *PathError on Plan 9 #39800

fhs opened this issue Jun 24, 2020 · 2 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Milestone

Comments

@fhs
Copy link
Contributor

fhs commented Jun 24, 2020

File.Sync currently returns *SyscallError on Plan 9. It should return *PathError so that the error type matches other systems.

What version of Go are you using (go version)?

$ go version
go version devel +master Sat Jun 20 01:48:54 EDT 2020 plan9/amd64

What did you do?

Run:

package main

import (
	"fmt"
	"os"
)

func main() {
	err := os.Stderr.Sync()
	if err != nil {
		fmt.Printf("%T: %v\n", err, err)
	}
}

What did you expect to see?

Filename in the error, for example on Linux:

*os.PathError: sync /dev/stderr: invalid argument

What did you see instead?

*os.SyscallError: fsync: permission denied

@gopherbot add labels OS-Plan9, NeedsFix

@gopherbot gopherbot added NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9 labels Jun 24, 2020
@ianlancetaylor
Copy link
Contributor

CC @0intro

@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jun 25, 2020
@gopherbot
Copy link

Change https://golang.org/cl/239857 mentions this issue: os: return *PathError error in File.Sync on Plan 9

@golang golang locked and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Projects
None yet
Development

No branches or pull requests

3 participants