summaryrefslogtreecommitdiff
path: root/usr/src
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
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')
-rw-r--r--usr/src/cmd/truss/actions.c62
-rw-r--r--usr/src/cmd/truss/codes.c28
-rw-r--r--usr/src/cmd/truss/print.c42
-rw-r--r--usr/src/cmd/truss/print.h4
-rw-r--r--usr/src/cmd/truss/proto.h7
-rw-r--r--usr/src/cmd/truss/systable.c34
-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
-rw-r--r--usr/src/uts/intel/os/name_to_sysnum1
-rw-r--r--usr/src/uts/sparc/os/name_to_sysnum1
13 files changed, 40 insertions, 339 deletions
diff --git a/usr/src/cmd/truss/actions.c b/usr/src/cmd/truss/actions.c
index f4853a628f..13d443ca03 100644
--- a/usr/src/cmd/truss/actions.c
+++ b/usr/src/cmd/truss/actions.c
@@ -20,15 +20,13 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -96,7 +94,7 @@ report_sleeping(private_t *pri, int dotrace)
(void) fputc('\t', stdout);
if (Lsp->pr_flags & PR_VFORKP)
(void) fputs("(waiting for child to exit()/exec()...)\n",
- stdout);
+ stdout);
else
(void) fputs("(sleeping...)\n", stdout);
pri->length = 0;
@@ -134,7 +132,7 @@ requested(private_t *pri, int flag, int dotrace)
putpname(pri);
timestamp(pri);
(void) printf(" Continued with signal #%d, %s",
- sig, signame(pri, sig));
+ sig, signame(pri, sig));
if (Lsp->pr_action.sa_handler == SIG_DFL)
(void) printf(" [default]");
else if (Lsp->pr_action.sa_handler == SIG_IGN)
@@ -174,11 +172,11 @@ jobcontrol(private_t *pri, int dotrace)
putpname(pri);
timestamp(pri);
(void) printf(" Stopped by signal #%d, %s",
- sig, signame(pri, sig));
+ sig, signame(pri, sig));
if ((Lsp->pr_flags & PR_ASLEEP) &&
(sys = Lsp->pr_syscall) > 0 && sys <= PRMAXSYS)
(void) printf(", in %s()",
- sysname(pri, sys, getsubcode(pri)));
+ sysname(pri, sys, getsubcode(pri)));
(void) fputc('\n', stdout);
Flush();
}
@@ -252,11 +250,11 @@ signalled(private_t *pri, int flag, int dotrace)
putpname(pri);
timestamp(pri);
(void) printf(" Received signal #%d, %s",
- sig, signame(pri, sig));
+ sig, signame(pri, sig));
if ((Lsp->pr_flags & PR_ASLEEP) &&
(sys = Lsp->pr_syscall) > 0 && sys <= PRMAXSYS)
(void) printf(", in %s()",
- sysname(pri, sys, getsubcode(pri)));
+ sysname(pri, sys, getsubcode(pri)));
if (Lsp->pr_action.sa_handler == SIG_DFL)
(void) printf(" [default]");
else if (Lsp->pr_action.sa_handler == SIG_IGN)
@@ -296,12 +294,12 @@ faulted(private_t *pri, int dotrace)
timestamp(pri);
(void) printf(" Incurred fault #%d, %s %%pc = 0x%.8lX",
- flt, proc_fltname(flt, pri->flt_name, sizeof (pri->flt_name)),
- (long)Lsp->pr_reg[R_PC]);
+ flt, proc_fltname(flt, pri->flt_name, sizeof (pri->flt_name)),
+ (long)Lsp->pr_reg[R_PC]);
if (flt == FLTPAGE)
(void) printf(" addr = 0x%.8lX",
- (long)Lsp->pr_info.si_addr);
+ (long)Lsp->pr_info.si_addr);
(void) fputc('\n', stdout);
if (Lsp->pr_info.si_signo != 0)
print_siginfo(pri, &Lsp->pr_info);
@@ -329,7 +327,7 @@ setupsysargs(private_t *pri, int what)
(void) memset(pri->sys_args, 0, sizeof (pri->sys_args));
if (what != Lsp->pr_syscall) { /* assertion */
(void) printf("%s\t*** Inconsistent syscall: %d vs %d ***\n",
- pri->pname, what, Lsp->pr_syscall);
+ pri->pname, what, Lsp->pr_syscall);
}
nargs = Lsp->pr_nsysarg;
for (i = 0;
@@ -422,11 +420,11 @@ sysentry(private_t *pri, int dotrace)
argv = (long)psinfo.pr_argv;
if (data_model == PR_MODEL_LP64)
(void) Pread(Proc, &offset,
- sizeof (offset), argv);
+ sizeof (offset), argv);
else {
offset32 = 0;
(void) Pread(Proc, &offset32,
- sizeof (offset32), argv);
+ sizeof (offset32), argv);
offset = offset32;
}
}
@@ -440,7 +438,7 @@ sysentry(private_t *pri, int dotrace)
while (len >= pri->sys_psize) {
free(pri->sys_path);
pri->sys_path = my_malloc(pri->sys_psize *= 2,
- "pathname buffer");
+ "pathname buffer");
}
(void) strcpy(pri->sys_path, s); /* remember pathname */
}
@@ -472,7 +470,7 @@ sysentry(private_t *pri, int dotrace)
name = sysname(pri, what, raw? -1 : subcode);
grow(pri, strlen(name) + 1);
pri->sys_leng = snprintf(pri->sys_string, pri->sys_ssize,
- "%s(", name);
+ "%s(", name);
for (i = 0; i < nargs; i++) {
arg = pri->sys_args[i];
x = stp->arg[i];
@@ -486,7 +484,7 @@ sysentry(private_t *pri, int dotrace)
outstring(pri, ", ");
if (x == LLO)
(*Print[x])(pri, raw, arg,
- pri->sys_args[++i]);
+ pri->sys_args[++i]);
else
(*Print[x])(pri, raw, arg);
/*
@@ -614,13 +612,13 @@ sysexit(private_t *pri, int dotrace)
pri->length += 8;
}
pri->length +=
- 7 + printf("\t(returning as child ...)");
+ 7 + printf("\t(returning as child ...)");
}
if (what == SYS_lwp_create &&
pri->Errno == 0 && pri->Rval1 == 0) {
pri->length &= ~07;
pri->length +=
- 7 + printf("\t(returning as new lwp ...)");
+ 7 + printf("\t(returning as new lwp ...)");
}
if (pri->Errno != 0 ||
(what != SYS_exec && what != SYS_execve)) {
@@ -722,16 +720,6 @@ sysexit(private_t *pri, int dotrace)
fmt = "= 0x%.8lX";
}
break;
- case SYS_signal:
- if (raw)
- /* EMPTY */;
- else if (rv1 == (int)SIG_DFL)
- fmt = "= SIG_DFL";
- else if (rv1 == (int)SIG_IGN)
- fmt = "= SIG_IGN";
- else if (rv1 == (int)SIG_HOLD)
- fmt = "= SIG_HOLD";
- break;
case SYS_sigtimedwait:
if (raw)
/* EMPTY */;
@@ -860,8 +848,8 @@ sysexit(private_t *pri, int dotrace)
if (ISREAD(what) || ISWRITE(what)) {
if (pri->iob_buf[0] != '\0')
(void) printf("%s 0x%.8lX: %s\n",
- pri->pname, pri->sys_args[1],
- pri->iob_buf);
+ pri->pname, pri->sys_args[1],
+ pri->iob_buf);
}
}
@@ -928,7 +916,7 @@ showpaths(private_t *pri, const struct systable *stp)
if (s != (char *)NULL)
(void) printf("%s 0x%.8lX: \"%s\"\n",
- pri->pname, addr, s);
+ pri->pname, addr, s);
}
}
}
@@ -958,14 +946,14 @@ showargs(private_t *pri, int raw)
if (data_model == PR_MODEL_LP64) {
int64_t xnargs;
ap = (long)(Lsp->pr_reg[R_SP]) + 16 * sizeof (int64_t)
- + STACK_BIAS;
+ + STACK_BIAS;
fail = (Pread(Proc, &xnargs, sizeof (xnargs), ap) !=
- sizeof (xnargs));
+ sizeof (xnargs));
nargs = (int)xnargs;
} else {
ap = (long)(Lsp->pr_reg[R_SP]) + 16 * sizeof (int32_t);
fail = (Pread(Proc, &nargs, sizeof (nargs), ap) !=
- sizeof (nargs));
+ sizeof (nargs));
}
ap += ptrsize;
#endif /* sparc */
@@ -1034,7 +1022,7 @@ dumpargs(private_t *pri, long ap, const char *str)
while (!interrupt) {
if (Pread(Proc, argaddr, ptrsize, ap) != ptrsize) {
(void) printf("\n%s\t*** Bad argument list? ***\n",
- pri->pname);
+ pri->pname);
return;
}
ap += ptrsize;
diff --git a/usr/src/cmd/truss/codes.c b/usr/src/cmd/truss/codes.c
index f31f48efe8..e910e9d919 100644
--- a/usr/src/cmd/truss/codes.c
+++ b/usr/src/cmd/truss/codes.c
@@ -1903,34 +1903,6 @@ pathconfname(int code)
return (str);
}
-const char *
-sigarg(private_t *pri, int arg)
-{
- char *str = NULL;
- int sig = (arg & SIGNO_MASK);
-
- str = pri->code_buf;
- arg &= ~SIGNO_MASK;
- if (arg & ~(SIGDEFER|SIGHOLD|SIGRELSE|SIGIGNORE|SIGPAUSE))
- (void) snprintf(pri->code_buf, sizeof (pri->code_buf),
- "%s|0x%X", signame(pri, sig), arg);
- else {
- (void) strcpy(str, signame(pri, sig));
- if (arg & SIGDEFER)
- (void) strcat(str, "|SIGDEFER");
- if (arg & SIGHOLD)
- (void) strcat(str, "|SIGHOLD");
- if (arg & SIGRELSE)
- (void) strcat(str, "|SIGRELSE");
- if (arg & SIGIGNORE)
- (void) strcat(str, "|SIGIGNORE");
- if (arg & SIGPAUSE)
- (void) strcat(str, "|SIGPAUSE");
- }
-
- return ((const char *)str);
-}
-
#define ALL_O_FLAGS \
(O_NDELAY|O_APPEND|O_SYNC|O_DSYNC|O_NONBLOCK|O_CREAT|O_TRUNC\
|O_EXCL|O_NOCTTY|O_LARGEFILE|O_RSYNC|O_XATTR|O_NOFOLLOW|O_NOLINKS)
diff --git a/usr/src/cmd/truss/print.c b/usr/src/cmd/truss/print.c
index fa5e43a2ae..bbcff25730 100644
--- a/usr/src/cmd/truss/print.c
+++ b/usr/src/cmd/truss/print.c
@@ -491,43 +491,9 @@ prt_opn(private_t *pri, int raw, long val) /* print open code */
}
void
-prt_sig(private_t *pri, int raw, long val) /* print signal name plus flags */
+prt_sig(private_t *pri, int raw, long val) /* print signal name */
{
- const char *s = raw? NULL : sigarg(pri, (int)val);
-
- if (s == NULL)
- prt_hex(pri, 0, val);
- else
- outstring(pri, s);
-}
-
-/* print signal name, masked with SIGNO_MASK */
-void
-prt_six(private_t *pri, int raw, long val)
-{
- const char *s = raw? NULL : sigarg(pri, (int)val & SIGNO_MASK);
-
- if (s == NULL)
- prt_hex(pri, 0, val);
- else
- outstring(pri, s);
-}
-
-void
-prt_act(private_t *pri, int raw, long val) /* print signal action value */
-{
- const char *s;
-
- if (raw)
- s = NULL;
- else if (val == (int)SIG_DFL)
- s = "SIG_DFL";
- else if (val == (int)SIG_IGN)
- s = "SIG_IGN";
- else if (val == (int)SIG_HOLD)
- s = "SIG_HOLD";
- else
- s = NULL;
+ const char *s = raw? NULL : signame(pri, (int)val);
if (s == NULL)
prt_hex(pri, 0, val);
@@ -2659,7 +2625,7 @@ void (* const Print[])() = {
prt_uts, /* UTS -- print utssys code */
prt_opn, /* OPN -- print open code */
prt_sig, /* SIG -- print signal name plus flags */
- prt_act, /* ACT -- print signal action value */
+ prt_nov, /* Was ACT, now available for reuse */
prt_msc, /* MSC -- print msgsys command */
prt_msf, /* MSF -- print msgsys flags */
prt_smc, /* SMC -- print semsys command */
@@ -2671,7 +2637,7 @@ void (* const Print[])() = {
prt_rst, /* RST -- print string returned by syscall */
prt_smf, /* SMF -- print streams message flags */
prt_ioa, /* IOA -- print ioctl argument */
- prt_six, /* SIX -- print signal, masked with SIGNO_MASK */
+ prt_nov, /* Was SIX, now available for reuse */
prt_mtf, /* MTF -- print mount flags */
prt_mft, /* MFT -- print mount file system type */
prt_iob, /* IOB -- print contents of I/O buffer */
diff --git a/usr/src/cmd/truss/print.h b/usr/src/cmd/truss/print.h
index a27b515227..916ebc2505 100644
--- a/usr/src/cmd/truss/print.h
+++ b/usr/src/cmd/truss/print.h
@@ -49,7 +49,7 @@ extern "C" {
#define UTS 9 /* print utssys code */
#define OPN 10 /* print open code */
#define SIG 11 /* print signal name plus flags */
-#define ACT 12 /* print signal action value */
+/* Number 12 now available for reuse */
#define MSC 13 /* print msgsys command */
#define MSF 14 /* print msgsys flags */
#define SMC 15 /* print semsys command */
@@ -61,7 +61,7 @@ extern "C" {
#define RST 21 /* print string returned by sys call */
#define SMF 22 /* print streams message flags */
#define IOA 23 /* print ioctl argument */
-#define SIX 24 /* print signal, masked with SIGNO_MASK */
+/* Number 24 now available for reuse */
#define MTF 25 /* print mount flags */
#define MFT 26 /* print mount file system type */
#define IOB 27 /* print contents of I/O buffer */
diff --git a/usr/src/cmd/truss/proto.h b/usr/src/cmd/truss/proto.h
index 7565bd8aa1..29c8632353 100644
--- a/usr/src/cmd/truss/proto.h
+++ b/usr/src/cmd/truss/proto.h
@@ -18,20 +18,18 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2006 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 */
-
#ifndef _PROTO_H
#define _PROTO_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/procset.h>
#ifdef __cplusplus
@@ -71,7 +69,6 @@ extern const char *sfsname(int);
extern const char *plockname(int);
extern const char *si86name(int);
extern const char *utscode(int);
-extern const char *sigarg(private_t *, int);
extern const char *openarg(private_t *, int);
extern const char *whencearg(int);
extern const char *msgflags(private_t *, int);
diff --git a/usr/src/cmd/truss/systable.c b/usr/src/cmd/truss/systable.c
index 79e23ec536..d63ccbabba 100644
--- a/usr/src/cmd/truss/systable.c
+++ b/usr/src/cmd/truss/systable.c
@@ -265,7 +265,7 @@ const struct systable systable[] = {
{"plock", 1, DEC, NOV, PLK}, /* 45 */
{"setgid", 1, DEC, NOV, UNS}, /* 46 */
{"getgid", 0, UNS, UNS}, /* 47 */
-{"signal", 2, HEX, NOV, SIG, ACT}, /* 48 */
+{ NULL, 8, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX, HEX},
{"msgsys", 6, DEC, NOV, DEC, DEC, DEC, DEC, DEC, DEC}, /* 49 */
{"sysi86", 4, HEX, NOV, S86, HEX, HEX, HEX, DEC, DEC}, /* 50 */
{"acct", 1, DEC, NOV, STG}, /* 51 */
@@ -506,16 +506,6 @@ const struct systable fcntltable[] = {
};
#define NFCNTLCODE (sizeof (fcntltable) / sizeof (struct systable))
-const struct systable sigtable[] = {
-{"signal", 2, HEX, NOV, SIG, ACT}, /* 0 */
-{"sigset", 2, HEX, NOV, SIX, ACT}, /* 1 */
-{"sighold", 1, HEX, NOV, SIX}, /* 2 */
-{"sigrelse", 1, HEX, NOV, SIX}, /* 3 */
-{"sigignore", 1, HEX, NOV, SIX}, /* 4 */
-{"sigpause", 1, HEX, NOV, SIX}, /* 5 */
-};
-#define NSIGCODE (sizeof (sigtable) / sizeof (struct systable))
-
const struct systable msgtable[] = {
{"msgget", 3, DEC, NOV, HID, KEY, MSF}, /* 0 */
{"msgctl", 4, DEC, NOV, HID, DEC, MSC, HEX}, /* 1 */
@@ -859,11 +849,6 @@ const struct sysalias sysalias[] = {
{ "getpgid", SYS_pgrpsys },
{ "setpgid", SYS_pgrpsys },
{ "getegid", SYS_getgid },
- { "sigset", SYS_signal },
- { "sighold", SYS_signal },
- { "sigrelse", SYS_signal },
- { "sigignore", SYS_signal },
- { "sigpause", SYS_signal },
{ "msgget", SYS_msgsys },
{ "msgctl", SYS_msgsys },
{ "msgctl64", SYS_msgsys },
@@ -1023,10 +1008,6 @@ subsys(int syscall, int subcode)
if ((unsigned)subcode < NOPEN64CODE)
stp = &open64table[subcode];
break;
- case SYS_signal: /* signal() + sigset() family */
- if ((unsigned)subcode < NSIGCODE)
- stp = &sigtable[subcode];
- break;
case SYS_msgsys: /* msgsys() */
if ((unsigned)subcode < NMSGCODE)
stp = &msgtable[subcode];
@@ -1264,16 +1245,6 @@ getsubcode(private_t *pri)
subcode = arg0;
}
break;
- case SYS_signal: /* signal() + sigset() family */
- switch (arg0 & ~SIGNO_MASK) {
- default: subcode = 0; break;
- case SIGDEFER: subcode = 1; break;
- case SIGHOLD: subcode = 2; break;
- case SIGRELSE: subcode = 3; break;
- case SIGIGNORE: subcode = 4; break;
- case SIGPAUSE: subcode = 5; break;
- }
- break;
case SYS_kaio: /* kaio() */
subcode = arg0 & ~AIO_POLL_BIT;
break;
@@ -1348,7 +1319,6 @@ maxsyscalls()
return (PRMAXSYS + 1
+ NOPENCODE - 1
+ NOPEN64CODE - 1
- + NSIGCODE - 1
+ NMSGCODE - 1
+ NSEMCODE - 1
+ NSHMCODE - 1
@@ -1394,8 +1364,6 @@ nsubcodes(int syscall)
return (NOPENCODE);
case SYS_open64:
return (NOPEN64CODE);
- case SYS_signal: /* signal() + sigset() family */
- return (NSIGCODE);
case SYS_msgsys: /* msgsys() */
return (NMSGCODE);
case SYS_semsys: /* semsys() */
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);
-}
diff --git a/usr/src/uts/intel/os/name_to_sysnum b/usr/src/uts/intel/os/name_to_sysnum
index 7554186c44..9c1c003f73 100644
--- a/usr/src/uts/intel/os/name_to_sysnum
+++ b/usr/src/uts/intel/os/name_to_sysnum
@@ -45,7 +45,6 @@ times 43
profil 44
setgid 46
getgid 47
-ssig 48
msgsys 49
sysi86 50
sysacct 51
diff --git a/usr/src/uts/sparc/os/name_to_sysnum b/usr/src/uts/sparc/os/name_to_sysnum
index db0bfd26e8..d89f570fc2 100644
--- a/usr/src/uts/sparc/os/name_to_sysnum
+++ b/usr/src/uts/sparc/os/name_to_sysnum
@@ -45,7 +45,6 @@ times 43
profil 44
setgid 46
getgid 47
-ssig 48
msgsys 49
sysacct 51
shmsys 52