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

x/sys/unix: add sysctl system call on Linux #52326

Open
kusattapansan10 opened this issue Apr 13, 2022 · 3 comments
Open

x/sys/unix: add sysctl system call on Linux #52326

kusattapansan10 opened this issue Apr 13, 2022 · 3 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@kusattapansan10
Copy link

kusattapansan10 commented Apr 13, 2022

I noticed that golang.org/x/sys/unix don't have the sysctl function. Most compiler language like c have it by default.
So I think go should have sysctl

@gopherbot gopherbot added this to the Proposal milestone Apr 13, 2022
@seankhliao seankhliao changed the title proposal: affected/package: golang.org/x/sys/unix. Suggestion Add sysctl proposal: x/sys/unix. Suggestion Add sysctl Apr 13, 2022
@seankhliao
Copy link
Member

Linux has deprecated / removed sysctl https://man7.org/linux/man-pages/man2/sysctl.2.html
Why should we add it?

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 13, 2022
@kusattapansan10
Copy link
Author

kusattapansan10 commented Apr 13, 2022

I don't think it's not a system call
Can be read from /proc/sys directory

It's still required to doing some things in linux.
For example to see cpu temperature in linux reading a sysctl value "hw.acpi.thermal.tz0.temperature" is most common way as far as I know

@ianlancetaylor
Copy link
Contributor

It's not necessary to open a proposal to add a simple system call wrapper to x/sys/unix, so taking this out of the proposal process.

@ianlancetaylor ianlancetaylor changed the title proposal: x/sys/unix. Suggestion Add sysctl x/sys/unix: add sysctl system call on Linux Apr 13, 2022
@ianlancetaylor ianlancetaylor removed Proposal WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Apr 13, 2022
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Unreleased Apr 13, 2022
@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants