5

The title says it all. I'm running Ubuntu 20.04, and I would like to read section 3 of the documentation of signal.

However, when I type the following the my terminal window:

$ man 3 signal

I get:

No manual entry for signal in section 3

However, I have found it somewhere else online. What am I missing here?

13

I think it's because - in Linux - signal is implemented as a system call rather than a library function, and therefore belongs in Section 2 of the manual rather than Section 3.

You can add a Section 3 man page for the POSIX signal implementation by installing the manpages-posix-dev package:

$ dpkg -S $(man -w 3 signal)
manpages-posix-dev: /usr/share/man/man3/signal.3posix.gz

For compatibility reasons, glibc also provides a signal library function that is documented in Section 3 of the manpages as bsd_signal:

BSD_SIGNAL(3)              Linux Programmer's Manual             BSD_SIGNAL(3)

NAME
       bsd_signal - signal handling with BSD semantics

SYNOPSIS
       #include <signal.h>

       typedef void (*sighandler_t)(int);

       sighandler_t bsd_signal(int signum, sighandler_t handler);

See also:

3
  • 1
    There also a signal in 3posix describing the POSIX spec – muru Mar 4 at 5:28
  • 1
    The apropos command can be used to find manual pages irrelevant of section. – Simon Richter Mar 4 at 11:04
  • @muru thanks - that seems more appropriate - I have updated the answer – steeldriver Mar 4 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.