Go to the first, previous, next, last section, table of contents.


psignal

Syntax

#include <signal.h>

extern char *sys_siglist[];
void psignal (int sig, const char *msg);

Description

This function produces a message on the standard error stream describing the signal given by its number in sig. It prints the string pointed to by msg, then the name of the signal, and a newline.

The names of signals can be retrieved using the array sys_siglist, with the signal number serving as an index into this array.

Portability

not ANSI, not POSIX

Example

  #include <signal.h>

  void sig_catcher (int sig)
  {
    psignal (progname, sig);
    return;
  }


Go to the first, previous, next, last section, table of contents.