summaryrefslogtreecommitdiff
path: root/usr/src/cmd/sh/fault.c
diff options
context:
space:
mode:
authorchin <none@none>2005-09-13 16:43:41 -0700
committerchin <none@none>2005-09-13 16:43:41 -0700
commit965005c81e0f731867d47892b9fb677030b102df (patch)
tree386a7f02c7fbc400e4974cf6a2cab6c77c48ff43 /usr/src/cmd/sh/fault.c
parentefaef81f6f4b9f1509dfc641a082086bb8aa24cd (diff)
downloadillumos-joyent-965005c81e0f731867d47892b9fb677030b102df.tar.gz
6268998 cmd/sh and gcc don't get along
6277636 *sh* can crash if it creates too many temporary files
Diffstat (limited to 'usr/src/cmd/sh/fault.c')
-rw-r--r--usr/src/cmd/sh/fault.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/usr/src/cmd/sh/fault.c b/usr/src/cmd/sh/fault.c
index cb944d5318..b397dc97f1 100644
--- a/usr/src/cmd/sh/fault.c
+++ b/usr/src/cmd/sh/fault.c
@@ -19,16 +19,17 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright (c) 1996, by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.13.17.1 */
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+
+#pragma ident "%Z%%M% %I% %E% SMI"
/*
* UNIX shell
*/
@@ -129,8 +130,7 @@ sigval[MAXTRAP]))() =
};
static int
-ignoring(i)
-register int i;
+ignoring(int i)
{
struct sigaction act;
if (trapflg[i] & SIGIGN)
@@ -172,7 +172,7 @@ int i;
void
done(sig)
{
- register unsigned char *t;
+ unsigned char *t;
int savxit;
if (t = trapcom[0])
@@ -211,10 +211,9 @@ done(sig)
}
static void
-fault(sig)
-register int sig;
+fault(int sig)
{
- register int flag;
+ int flag;
switch (sig) {
case SIGALRM:
@@ -280,7 +279,7 @@ handle(sig, func)
void
stdsigs()
{
- register int i;
+ int i;
stack_t ss;
int err = 0;
int rtmin = (int)SIGRTMIN;
@@ -319,8 +318,8 @@ stdsigs()
void
oldsigs()
{
- register int i;
- register unsigned char *t;
+ int i;
+ unsigned char *t;
i = MAXTRAP;
while (i--)
@@ -340,8 +339,8 @@ oldsigs()
void
chktrap()
{
- register int i = MAXTRAP;
- register unsigned char *t;
+ int i = MAXTRAP;
+ unsigned char *t;
trapnote &= ~TRAPSET;
while (--i)
@@ -360,9 +359,8 @@ chktrap()
}
}
-systrap(argc, argv)
-int argc;
-char **argv;
+void
+systrap(int argc, char **argv)
{
int sig;
@@ -427,9 +425,8 @@ char **argv;
}
}
-unsigned int
-sleep(ticks)
-unsigned int ticks;
+void
+sh_sleep(unsigned int ticks)
{
sigset_t set, oset;
struct sigaction act, oact;