summaryrefslogblamecommitdiff
path: root/src/signal/psiginfo.c
blob: fa46d2bf126a89515ee65f94b5623e8c0463ce1d (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                     
#include <stdio.h>
#include <string.h>
#include <signal.h>

void psiginfo(siginfo_t *si, const char *msg)
{
	char *s = strsignal(si->si_signo);
	if (msg) fprintf(stderr, "%s: %s\n", msg, s);
	else fprintf(stderr, "%s\n", s);
}