提交 ecc0f513 编写于 作者: R Rich Felker

implement psignal and psiginfo

上级 e0037efc
#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);
}
#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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册