mirror of https://git.musl-libc.org/git/musl
2 changed files with 20 additions and 0 deletions
@ -0,0 +1,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); |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
#include <stdio.h> |
||||
|
#include <string.h> |
||||
|
#include <signal.h> |
||||
|
|
||||
|
void psignal(int sig, const char *msg) |
||||
|
{ |
||||
|
char *s = strsignal(sig); |
||||
|
if (msg) fprintf(stderr, "%s: %s\n", msg, s); |
||||
|
else fprintf(stderr, "%s\n", s); |
||||
|
} |
||||
Loading…
Reference in new issue