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

syscall: should contain X_OK, R_OK & W_OK for use with syscall.Access() #6262

ThomasHabets opened this issue Aug 27, 2013 · 5 comments


Copy link

What steps will reproduce the problem?
1. write code like syscall.Access("foo", syscall.X_OK)
2. try to run "go run a.go"
3. Get error:
./a.go:8: undefined: syscall.X_OK

What is the expected output?
Expect [RXW]_OK to exist. Otherwise how can syscall.Access() be used?

What do you see instead?
Compile error.

Which compiler are you using (5g, 6g, 8g, gccgo)?
whichever is the amd64 one.

Which operating system are you using?

Which version are you using?  (run 'go version')
go version go1.1 linux/amd64

Please provide any additional information below.

Filing bug as requested.
Copy link

Comment 1:

Labels changed: added priority-later, go1.2maybe, removed priority-triage.

Status changed to Accepted.

Copy link
Contributor Author

Comment 2:

Also F_OK.

Copy link

rsc commented Sep 9, 2013

Comment 3:

syscall.Access can be used because these constants are the same as the file permission
bits. R_OK=4, W_OK=2, X_OK=1, F_OK=0, on all systems. People just wrote the numbers
before POSIX came along and decided to name everything.
Not critical, so leaving for Go 1.3.

Labels changed: added go1.3maybe, removed go1.2maybe.

Copy link

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added release-none, removed go1.3maybe.

Copy link

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added repo-main.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants