/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
#include "lint.h"
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
typedef struct signame {
const char *sigstr;
const int signum;
} signame_t;
{ "EXIT", 0 },
{ "HUP", SIGHUP },
{ "INT", SIGINT },
{ "QUIT", SIGQUIT },
{ "ILL", SIGILL },
{ "TRAP", SIGTRAP },
{ "ABRT", SIGABRT },
{ "IOT", SIGIOT },
{ "EMT", SIGEMT },
{ "FPE", SIGFPE },
{ "KILL", SIGKILL },
{ "BUS", SIGBUS },
{ "SEGV", SIGSEGV },
{ "SYS", SIGSYS },
{ "PIPE", SIGPIPE },
{ "ALRM", SIGALRM },
{ "TERM", SIGTERM },
{ "USR1", SIGUSR1 },
{ "USR2", SIGUSR2 },
{ "CLD", SIGCLD },
{ "CHLD", SIGCHLD },
{ "PWR", SIGPWR },
{ "WINCH", SIGWINCH },
{ "URG", SIGURG },
{ "POLL", SIGPOLL },
{ "IO", SIGPOLL },
{ "STOP", SIGSTOP },
{ "TSTP", SIGTSTP },
{ "CONT", SIGCONT },
{ "TTIN", SIGTTIN },
{ "TTOU", SIGTTOU },
{ "VTALRM", SIGVTALRM },
{ "PROF", SIGPROF },
{ "XCPU", SIGXCPU },
{ "XFSZ", SIGXFSZ },
{ "WAITING", SIGWAITING },
{ "LWP", SIGLWP },
{ "FREEZE", SIGFREEZE },
{ "THAW", SIGTHAW },
{ "CANCEL", SIGCANCEL },
{ "LOST", SIGLOST },
{ "XRES", SIGXRES },
{ "JVM1", SIGJVM1 },
{ "JVM2", SIGJVM2 },
{ "INFO", SIGINFO },
{ "RTMIN", _SIGRTMIN },
{ "RTMAX", _SIGRTMAX },
};
static int str2long(const char *, long *);
static int
{
char *q;
int error;
errno = 0;
errno = saved_errno;
return (error);
}
int
{
if (*s >= '0' && *s <= '9') {
long val;
return (-1);
return (0);
}
}
return (-1);
} else {
return (0);
}
}
return (-1);
}
}
int
sig2str(int i, char *s)
{
return (0);
}
}
return (-1);
}