delorie.com/djgpp/doc/libc/libc_625.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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

ANSI/ISO C No
POSIX No

Example

 
  #include <signal.h>

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

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004