/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "lint.h"
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <wait.h>
/*
* Check for valid signal number as per SVID.
*/
return (code); \
}
/*
* Equivalent to stopdefault set in the kernel implementation (sig.c).
*/
#define STOPDEFAULT(s) \
/*
* SVr3.x signal compatibility routines. They are now
* implemented as library routines instead of system
* calls.
*/
void(*
{
/*
* Pay special attention if sig is SIGCHLD and
* the disposition is SIG_IGN, per sysV signal man page.
*/
}
if (STOPDEFAULT(sig))
return (SIG_ERR);
return (oact.sa_handler);
}
int
{
/*
* errno set on failure by either sigaddset or sigprocmask.
*/
(void) sigemptyset(&set);
return (-1);
}
int
{
/*
* errno set on failure by either sigaddset or sigprocmask.
*/
(void) sigemptyset(&set);
return (-1);
}
int
{
/*
* Pay special attention if sig is SIGCHLD and
* the disposition is SIG_IGN, per sysV signal man page.
*/
}
if (STOPDEFAULT(sig))
return (-1);
(void) sigemptyset(&set);
return (-1);
}
int
{
int rval;
/*
* sigpause() is defined to unblock the signal
* and not block it again on return.
* sigsuspend() restores the original signal set,
* so we have to unblock sig overtly.
*/
return (-1);
return (rval);
}
void(*
{
int code;
(void) sigemptyset(&nset);
return (SIG_ERR);
return (SIG_ERR);
return (SIG_ERR);
} else {
/*
* Pay special attention if sig is SIGCHLD and
* the disposition is SIG_IGN, per sysV signal man page.
*/
}
if (STOPDEFAULT(sig))
return (SIG_ERR);
return (SIG_ERR);
}
return (SIG_ERR);
else if (code == 1)
return (SIG_HOLD);
return (oact.sa_handler);
}