signalmap.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 1996 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
#include "signalmap.h"
extern int errno;
struct sigcontext *scp;
char *addr;
{
switch (sig) {
case SIGBUS:
case SIGSEGV:
case 3: /* 5.x value for FC_OBJERR */
break;
case 5: /* 5.x value for FC_NOMAP */
break;
}
break;
}
}
int sig;
void (*a)();
{
int newsig;
sv.sv_handler = a;
#ifdef S5EMUL
#else
#endif
return (BADSIG);
return (osv.sv_handler);
}
int sig;
{
int newsig;
void (*oldhand)();
return (-1);
}
/*
* To be compatible with the behavior of SunOS 4.x:
* If the new signal handler is SIG_IGN or SIG_DFL,
* do not change the signal's entry in the handler array.
* This allows a child of vfork(2) to set signal handlers
* to SIG_IGN or SIG_DFL without affecting the parent.
*/
}
}
return (-1);
}
return (0);
}
int mask;
{
int ret;
return(maptooldmask(ret));
}
int mask;
{
int ret;
return(maptooldmask(ret));
}
int mask;
{
int ret;
}
{
}
int sig;
{
switch (sig) {
case SIGURG: /* urgent condition on IO channel */
return(XSIGURG);
case SIGSTOP: /* sendable stop signal not from tty */
return(XSIGSTOP);
case SIGTSTP: /* stop signal from tty */
return(XSIGTSTP);
case SIGCONT: /* continue a stopped process */
return(XSIGCONT);
case SIGCLD: /* System V name for SIGCHLD */
return(XSIGCLD);
case SIGTTIN: /* to readers pgrp upon background tty read */
return(XSIGTTIN);
case SIGTTOU: /* like TTIN for output */
return(XSIGTTOU);
return(XSIGIO);
case SIGXCPU: /* exceeded CPU time limit */
return(XSIGXCPU);
case SIGXFSZ: /* exceeded file size limit */
return(XSIGXFSZ);
case SIGVTALRM: /* virtual time alarm */
return(XSIGVTALRM);
case SIGPROF: /* profiling time alarm */
return(XSIGPROF);
case SIGWINCH: /* window changed */
return(XSIGWINCH);
case SIGLOST: /* resource lost, not supported */
return(-1);
case SIGUSR1:
return(XSIGUSR1);
case SIGUSR2: /* user defined signal 2 */
return(XSIGUSR2);
default:
return(sig);
}
}
int sig;
{
switch (sig) {
case XSIGURG: /* urgent condition on IO channel */
return(SIGURG);
case XSIGSTOP: /* sendable stop signal not from tty */
return(SIGSTOP);
case XSIGTSTP: /* stop signal from tty */
return(SIGTSTP);
case XSIGCONT: /* continue a stopped process */
return(SIGCONT);
case XSIGCLD: /* System V name for SIGCHLD */
return(SIGCLD);
case XSIGTTIN: /* to readers pgrp upon background tty read */
return(SIGTTIN);
case XSIGTTOU: /* like TTIN for output */
return(SIGTTOU);
return(SIGIO);
case XSIGXCPU: /* exceeded CPU time limit */
return(SIGXCPU);
case XSIGXFSZ: /* exceeded file size limit */
return(SIGXFSZ);
case XSIGVTALRM: /* virtual time alarm */
return(SIGVTALRM);
case XSIGPROF: /* profiling time alarm */
return(SIGPROF);
case XSIGWINCH: /* window changed */
return(SIGWINCH);
case XSIGUSR1:
return(SIGUSR1);
case XSIGUSR2: /* user defined signal 2 */
return(SIGUSR2);
case XSIGPWR: /* user defined signal 2 */
return(-1);
default:
return(sig);
}
}
int maptooldmask(mask)
int mask;
{
int omask;
return(omask);
}
int maptonewmask(omask)
int omask;
{
int mask;
if (omask == -1) {
return(-1);
}
return(mask);
}