What is the difference between multiple manual pages of the same command?

I started learning socket programming for C / C ++ and studying man pages for features like bind, listen, etc.

While navigating between man pages, I noticed that there are situations when there are several help pages for the same system call, for example. nest()

http://man7.org/linux/man-pages/man2/socket.2.html

http://man7.org/linux/man-pages/man3/socket.3p.html

http://man7.org/linux/man-pages/man7/socket.7.html

Among these guides, what appears in my linux box is the first (socket (2)).

I noticed that one with the suffix 3p is called the "POSIX Programmer", and the other two are called the "Linux Programmer's Guide." Functional prototypes and customs are the same (as I understand it).

My question is: what is the purpose of two different versions of manuals for Linux programmers for the same system call, and what is the number between the means of the parente (socket (2), socket (3p), socket (7))?

+5
source share
1 answer

Personal pages are organized in sections, each section has its own theme. Look at the man page for man , try running man man , it lists all available sections:

  • Executable programs or shell commands
  • System calls (kernel-provided functions)
  • Library calls (functions in program libraries)
  • Special files (commonly found in / dev)
  • File Formats and Conventions, e.g. / etc / passwd
  • Games
  • Miscellaneous (including macro packages and conventions), for example. man (7), groff (7)
  • System administration commands (usually only for root)
  • Kernel routines [non-standard]

For example, socket "socket (2)" is the system call provided by the kernel of the operating system, "socket (3)" is the POSIX interface provided by the library, "socket (7)" are general documents on the topic of the socket. You can see that all three have different content.

+10
source

Source: https://habr.com/ru/post/1247694/


All Articles