3

**Disclosure - I am a beginner C programmer and am not completely familiar with how to interpret the man pages nor the correct word choice in speaking about C - any editing or clarification to this question is appreciated.*

Question: I am reading through the man pages on signal(7) and commonly see a reference to signal(2).

How is the reference to signal different if I say 'signal(7)' as opposed to 'signal(2)'? Does this have to do with 7 being a library call and 2 being a system call?

Daniel Gaeta
  • 774
  • 2
  • 9
  • 22

2 Answers2

6

signal(7) is the Signal handling overview.
http://man7.org/linux/man-pages/man7/signal.7.html

signal(2) is the API-function (a system-call).
http://man7.org/linux/man-pages/man2/signal.2.html

Anyway, here a section overview for man-pages: http://linux.die.net/man

1 user commands (introduction)
2 system calls (introduction)
3 library functions (introduction)
4 special files (introduction)
5 file formats (introduction)
6 games (introduction)
7 conventions and miscellany (introduction)
8 administration and privileged commands (introduction)
L math library functions
N tcl functions 
Deduplicator
  • 44,692
  • 7
  • 66
  • 118
-1

Well, signal() is system dependent, it depends on your OS. As referenced here:

   The behavior of signal() varies across UNIX versions, and has also
   varied historically across different versions of Linux.  Avoid its
   use: use sigaction(2) instead.  See Portability below.

Src

signal(2) on linux access the manual, however

Overview of signal

Caffeinated
  • 11,982
  • 40
  • 122
  • 216