Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

linux header <linux/sysctl.h> deprecated

is linux header <linux/sysctl.h> deprecated ?

I read this on man 2 sysctl:

This system call first appeared in Linux 1.3.57. It was removed in Linux 5.5; glibc support was removed in version 2.32.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I misunderstood this line?

How to change system parameters in future (after removal)?

>Solution :

  1. It has the deprecated attribute.
[[deprecated]] int _sysctl(struct __sysctl_args *args);
  1. The description states that it no longer exists on current kernels.

This system call no longer exists on current kernels!

  1. "NOTES" suggest using /proc/sys interface:

Use of this system call was long discouraged: since Linux 2.6.24,
uses of this system call result in warnings in the kernel log,
and in Linux 5.5, the system call was finally removed. Use the
/proc/sys interface instead.

and the man page links to this: proc.

So yes, it is deprecated.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading