-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/sys/unix: add missing values from syscall pkg to enable complete migration #19697
Comments
I think that |
Hm. Wouldn't that mean still using syscall then? Or is there an alternative for users that's outside of syscall for |
@clnperez, yes, still using syscall. There's no alternative. It's part of the API: https://golang.org/pkg/os/exec/#Cmd.SysProcAttr |
Then those things that can't be migrated from syscall to sys/unix should be documented so it is clear. Right now the syscall package documentation just says to migrate from syscall to sys/unix. Maybe that paragraph just needs a statement to identify the exceptions. |
That is the only case:
If you want to add something minimal to the pkg syscall docs, feel free to send a CL. |
Apparently at this point in time the generator scripts in the syscall pkg and x/sys/unix are not in sync with the z files they generate. I could make the necessary changes to add definitions of Signal and Errno in sys/unix but don't know how to correctly generate all the right files without a lot of extra unrelated changes or lots of manual changes. Will changing the comments in syscall/syscall.go update the pkg syscall docs? |
@laboger, please wait for https://go-review.googlesource.com/c/37943/ |
Yes. You can send a CL for that part at least. |
Change https://golang.org/cl/80955 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go tip
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04 and Fedora22, Red Hat 7.x on ppc64le & ppc64
What did you do?
Trying to migrate Go code from syscall to sys/unix as described in the golang syscall package documentation https://golang.org/pkg/syscall/. This was the suggested solution for issue #19560. While it is possible to fix just the case that is described in this issue, that is not a complete solution. We want to avoid hitting another issue because of using syscall, so we'd like to migrate use of syscall to sys/unix. Also having a mixture of references to syscall and sys/unix is confusing since then it is not clear when to use which one.
Issues with migrating from syscall to sys/unix:
I was going to try a change for this based on a suggestion by Ian, but I'm not able to get the generator scripts in sys/unix to work. I get these errors:
GOOS=linux GOARCH=ppc64le ./mkall.sh
could not determine kind of name for C.TIOCGETC
could not determine kind of name for C.TIOCGETP
could not determine kind of name for C.TIOCGLTC
could not determine kind of name for C.TIOCSETC
could not determine kind of name for C.TIOCSETN
could not determine kind of name for C.TIOCSETP
could not determine kind of name for C.TIOCSLTC
This happened on Fedora22 and Ubuntu 16.04. If I could get some direction on what this might be that would help.
The text was updated successfully, but these errors were encountered: