views:

187

answers:

3

What does the number in parentheses after C function name mean in manpages ? For instance, I see fork(2) and wonder what the 2 means...

Also, I read things like pthread_atfork(3C), so what does the 3C stand for?

+10  A: 

It is the section of the manual.

Sjoerd
Awesome, thank you !
Axel
And it's necessary because the same word might be a command (1) and a function (3)
Martin Beckett
`time` for example, has manual pages in sections 1, 2, 7 and n. Each section has an intro, e.g. `man 3 intro`.
Sjoerd
+7  A: 

The number refers to the section in the man pages. For instance, 1 is for general system commands, 2 is for system calls, 3 is for C library functions. More info here.

Edit: You should be able to find a list of sections by looking up the man page for man ('man man').

Jeff
+3  A: 

(2) means the man page is in section 2 of the man system. Originally the man pages were also on paper, in seven volumes, so fork() and other system calls were found in the second book.

(3C) means section 3C, The C presumably means that it references a function in the C library (libc).

MattBianco