summaryrefslogtreecommitdiff
path: root/usr/src/uts/common
diff options
context:
space:
mode:
authorRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-11-02 06:49:25 -0800
committerRoger A. Faulkner <Roger.Faulkner@Sun.COM>2009-11-02 06:49:25 -0800
commit5403172acfed6a387c70d9cddbc195d9ba8c1e05 (patch)
tree20a3b0706806e7b52481d622489a04d02f5df055 /usr/src/uts/common
parentc7bef3b16d3d2a0b09ff75fbbd724283ef1ee7e7 (diff)
downloadillumos-joyent-5403172acfed6a387c70d9cddbc195d9ba8c1e05.tar.gz
PSARC 2009/595 delete ssig system call trap
6896743 The ancient SVR3 ssig() system call trap should be deleted
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r--usr/src/uts/common/Makefile.files1
-rw-r--r--usr/src/uts/common/os/sysent.c5
-rw-r--r--usr/src/uts/common/sys/iso/signal_iso.h18
-rw-r--r--usr/src/uts/common/sys/syscall.h11
-rw-r--r--usr/src/uts/common/syscall/ssig.c165
5 files changed, 6 insertions, 194 deletions
diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files
index 3aa180f583..aa1b921b69 100644
--- a/usr/src/uts/common/Makefile.files
+++ b/usr/src/uts/common/Makefile.files
@@ -310,7 +310,6 @@ GENUNIX_OBJS += \
sock_conf.o \
space.o \
sscanf.o \
- ssig.o \
stat.o \
statfs.o \
statvfs.o \
diff --git a/usr/src/uts/common/os/sysent.c b/usr/src/uts/common/os/sysent.c
index e69eb3c1a8..c80048ade0 100644
--- a/usr/src/uts/common/os/sysent.c
+++ b/usr/src/uts/common/os/sysent.c
@@ -109,7 +109,6 @@ int setpgrp();
int setuid();
uintptr_t shmsys();
uint64_t sidsys();
-int ssig();
int sigprocmask();
int sigsuspend();
int sigaltstack();
@@ -486,7 +485,7 @@ struct sysent sysent[NSYSCALL] =
/* 45 */ SYSENT_LOADABLE(), /* (was proc lock) */
/* 46 */ SYSENT_CI("setgid", setgid, 1),
/* 47 */ SYSENT_2CI("getgid", getgid, 0),
- /* 48 */ SYSENT_CI("sig", ssig, 2),
+ /* 48 */ SYSENT_LOADABLE(), /* (was ssig) */
/* 49 */ SYSENT_LOADABLE(), /* msgsys */
/* 50 */ IF_x86(
SYSENT_CI("sysi86", sysi86, 4),
@@ -889,7 +888,7 @@ struct sysent sysent32[NSYSCALL] =
/* 45 */ SYSENT_LOADABLE32(), /* (was proc lock) */
/* 46 */ SYSENT_CI("setgid", setgid, 1),
/* 47 */ SYSENT_2CI("getgid", getgid, 0),
- /* 48 */ SYSENT_CI("sig", ssig, 2),
+ /* 48 */ SYSENT_LOADABLE32(), /* (was ssig) */
/* 49 */ SYSENT_LOADABLE32(), /* msgsys */
/* 50 */ IF_386_ABI(
SYSENT_CI("sysi86", sysi86, 4),
diff --git a/usr/src/uts/common/sys/iso/signal_iso.h b/usr/src/uts/common/sys/iso/signal_iso.h
index 7c499794fa..1222e85ea0 100644
--- a/usr/src/uts/common/sys/iso/signal_iso.h
+++ b/usr/src/uts/common/sys/iso/signal_iso.h
@@ -2,9 +2,8 @@
* 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.
+ * 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
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-
/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
@@ -43,8 +42,6 @@
#ifndef _SYS_SIGNAL_ISO_H
#define _SYS_SIGNAL_ISO_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.44 */
-
#include <sys/unistd.h> /* needed for _SC_SIGRT_MIN/MAX */
#ifdef __cplusplus
@@ -133,13 +130,6 @@ typedef SIG_FUNC_TYP *SIG_TYP;
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
-#define SIGNO_MASK 0xFF
-#define SIGDEFER 0x100
-#define SIGHOLD 0x200
-#define SIGRELSE 0x400
-#define SIGIGNORE 0x800
-#define SIGPAUSE 0x1000
-
#ifdef __cplusplus
}
#endif
diff --git a/usr/src/uts/common/sys/syscall.h b/usr/src/uts/common/sys/syscall.h
index 7c75f50424..41a95c33d2 100644
--- a/usr/src/uts/common/sys/syscall.h
+++ b/usr/src/uts/common/sys/syscall.h
@@ -104,17 +104,6 @@ extern "C" {
#define SYS_plock 45
#define SYS_setgid 46
#define SYS_getgid 47
-#define SYS_signal 48
- /*
- * subcodes:
- * signal(sig, f) :: signal(sig, f) ((sig&SIGNO_MASK) == sig)
- * sigset(sig, f) :: signal(sig|SIGDEFER, f)
- * sighold(sig) :: signal(sig|SIGHOLD)
- * sigrelse(sig) :: signal(sig|SIGRELSE)
- * sigignore(sig) :: signal(sig|SIGIGNORE)
- * sigpause(sig) :: signal(sig|SIGPAUSE)
- * see <sys/signal.h>
- */
#define SYS_msgsys 49
/*
* subcodes:
diff --git a/usr/src/uts/common/syscall/ssig.c b/usr/src/uts/common/syscall/ssig.c
deleted file mode 100644
index 45e3953bb3..0000000000
--- a/usr/src/uts/common/syscall/ssig.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2009 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/sysmacros.h>
-#include <sys/systm.h>
-#include <sys/user.h>
-#include <sys/errno.h>
-#include <sys/proc.h>
-#include <sys/fault.h>
-#include <sys/procset.h>
-#include <sys/signal.h>
-#include <sys/schedctl.h>
-#include <sys/debug.h>
-
-
-/*
- * ssig() is the old common entry for signal, sigset, sighold,
- * sigrelse, sigignore and sigpause.
- *
- * All of these interfaces have been reimplemented in libc using
- * calls to sigaction, sigsuspend and sigprocmask.
- *
- * This kernel interface is no longer called by any application
- * that is dynamically linked with libc. It exists solely for
- * the benefit of really old statically-linked applications.
- * It should be removed from the system.
- */
-
-int
-ssig(int signo, void (*func)())
-{
- int sig;
- struct proc *p;
- int flags;
- int retval = 0;
- int sigcld_look = 0;
-
- sig = signo & SIGNO_MASK;
-
- if (sig <= 0 || sig >= NSIG || sigismember(&cantmask, sig))
- return (set_errno(EINVAL));
-
- p = ttoproc(curthread);
- mutex_enter(&p->p_lock);
- schedctl_finish_sigblock(curthread);
- switch (signo & ~SIGNO_MASK) {
-
- case SIGHOLD: /* sighold */
- sigaddset(&curthread->t_hold, sig);
- mutex_exit(&p->p_lock);
- return (0);
-
- case SIGRELSE: /* sigrelse */
- sigdelset(&curthread->t_hold, sig);
- curthread->t_sig_check = 1; /* so ISSIG will see release */
- mutex_exit(&p->p_lock);
- return (0);
-
- case SIGPAUSE: /* sigpause */
- sigdelset(&curthread->t_hold, sig);
- curthread->t_sig_check = 1; /* so ISSIG will see release */
- /* pause() */
- while (cv_wait_sig_swap(&curthread->t_delay_cv, &p->p_lock))
- ;
- mutex_exit(&p->p_lock);
- return (set_errno(EINTR));
-
- case SIGIGNORE: /* signore */
- sigdelset(&curthread->t_hold, sig);
- curthread->t_sig_check = 1; /* so ISSIG will see release */
- func = SIG_IGN;
- flags = 0;
- break;
-
- case SIGDEFER: /* sigset */
- if (sigismember(&curthread->t_hold, sig))
- retval = (int)SIG_HOLD;
- else
- retval = (int)(uintptr_t)PTOU(curproc)->u_signal[sig-1];
- if (func == SIG_HOLD) {
- sigaddset(&curthread->t_hold, sig);
- mutex_exit(&p->p_lock);
- return (retval);
- }
-
-#if defined(__sparc)
- /*
- * Check alignment of handler
- */
- if (func != SIG_IGN && func != SIG_DFL &&
- ((uintptr_t)func & 0x3) != 0) {
- mutex_exit(&p->p_lock);
- return (set_errno(EINVAL));
- }
-#endif
- sigdelset(&curthread->t_hold, sig);
- curthread->t_sig_check = 1; /* so post_syscall sees it */
- flags = 0;
- break;
-
- case 0: /* signal */
-#if defined(__sparc)
- /*
- * Check alignment of handler
- */
- if (func != SIG_IGN && func != SIG_DFL &&
- ((uintptr_t)func & 0x3) != 0) {
- mutex_exit(&p->p_lock);
- return (set_errno(EINVAL));
- }
-#endif
- retval = (int)(uintptr_t)PTOU(curproc)->u_signal[sig-1];
- flags = SA_RESETHAND|SA_NODEFER;
- break;
-
- default: /* error */
- mutex_exit(&p->p_lock);
- return (set_errno(EINVAL));
- }
-
- if (sigismember(&stopdefault, sig))
- flags |= SA_RESTART;
- else if (sig == SIGCLD) {
- flags |= SA_NOCLDSTOP;
- if (func == SIG_IGN)
- flags |= SA_NOCLDWAIT;
- sigcld_look = 1;
- }
-
- setsigact(sig, func, nullsmask, flags);
- mutex_exit(&p->p_lock);
-
- if (sigcld_look)
- sigcld_repost();
-
- return (retval);
-}