sl@0: /*
sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: * All rights reserved.
sl@0: * This component and the accompanying materials are made available
sl@0: * under the terms of "Eclipse Public License v1.0"
sl@0: * which accompanies this distribution, and is available
sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: *
sl@0: * Initial Contributors:
sl@0: * Nokia Corporation - initial contribution.
sl@0: *
sl@0: * Contributors:
sl@0: *
sl@0: * Description:
sl@0: *
sl@0: */
sl@0: 
sl@0: 
sl@0: #include <signal.h>
sl@0: #include <stdio.h>
sl@0: 
sl@0: EXPORT_C void psignal(int sig, const char *s)
sl@0: 	{
sl@0: 	if (sig < 1 || sig >= NSIG)  //What about RT signal(RTMAX)
sl@0: 		{
sl@0: 		if(s)
sl@0: 			fprintf(stderr,"%s: Unknown signal %d\n",s,sig);
sl@0: 		else
sl@0: 			fprintf(stderr,"Unknown signal %d\n",sig);
sl@0: 		}
sl@0: 	else
sl@0: 		{
sl@0: 		if(s)
sl@0: 			fprintf(stderr,"%s: %s\n",s,sys_siglist[sig]);
sl@0: 		else
sl@0: 			fprintf(stderr,"%s\n",sys_siglist[sig]);
sl@0: 		}
sl@0: 	return;
sl@0: 	}