1*24df6592SIngo Weinhold /* 2*24df6592SIngo Weinhold * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3*24df6592SIngo Weinhold * Distributed under the terms of the MIT License. 4*24df6592SIngo Weinhold */ 5*24df6592SIngo Weinhold 6*24df6592SIngo Weinhold 7*24df6592SIngo Weinhold #include <signal.h> 8*24df6592SIngo Weinhold 9*24df6592SIngo Weinhold #include <stdio.h> 10*24df6592SIngo Weinhold #include <string.h> 11*24df6592SIngo Weinhold 12*24df6592SIngo Weinhold 13*24df6592SIngo Weinhold void psignal(int signal,const char * message)14*24df6592SIngo Weinholdpsignal(int signal, const char* message) 15*24df6592SIngo Weinhold { 16*24df6592SIngo Weinhold if (message != NULL && message[0] != '\0') 17*24df6592SIngo Weinhold fprintf(stderr, "%s: %s\n", message, strsignal(signal)); 18*24df6592SIngo Weinhold else 19*24df6592SIngo Weinhold fprintf(stderr, "%s\n", strsignal(signal)); 20*24df6592SIngo Weinhold } 21