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?

1 Answer 1

15

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, 2021 at 5:28
  • 1
    The apropos command can be used to find manual pages irrelevant of section. Mar 4, 2021 at 11:04
  • @muru thanks - that seems more appropriate - I have updated the answer Mar 4, 2021 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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