1: /*	@(#)psignal.c	4.1 (Berkeley) 2/10/83	*/
   2: /*
   3:  * Print the name of the signal indicated
   4:  * along with the supplied message.
   5:  */
   6: #include <signal.h>
   7: 
   8: extern  char *sys_siglist[];
   9: 
  10: psignal(sig, s)
  11:     unsigned sig;
  12:     char *s;
  13: {
  14:     register char *c;
  15:     register n;
  16: 
  17:     c = "Unknown signal";
  18:     if (sig < NSIG)
  19:         c = sys_siglist[sig];
  20:     n = strlen(s);
  21:     if (n) {
  22:         write(2, s, n);
  23:         write(2, ": ", 2);
  24:     }
  25:     write(2, c, strlen(c));
  26:     write(2, "\n", 1);
  27: }

Defined functions

psignal defined in line 10; never used
Last modified: 1983-05-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 660
Valid CSS Valid XHTML 1.0 Strict