diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-05-03 17:25:01 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-05-03 17:25:01 +0000 |
commit | c1f0251976473d54cc4d46ef0dbfd8a4e2910904 (patch) | |
tree | c94c4365b1af58790980c5a34eef9775fbe70e1a /lib | |
parent | cb06773fd66aeb958d8723bdc65b3bc82ea4f1d1 (diff) |
XPG specifies bsd_signal(3) so make it an alias for signal(3); OK deraadt@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/signal.3 | 28 | ||||
-rw-r--r-- | lib/libc/gen/signal.c | 9 |
2 files changed, 25 insertions, 12 deletions
diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index 5f4afbf09de..fab391fe4c9 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: signal.3,v 1.28 2004/04/30 22:01:10 millert Exp $ +.\" $OpenBSD: signal.3,v 1.29 2004/05/03 17:25:00 millert Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -35,19 +35,31 @@ .Nd simplified software signal facilities .Sh SYNOPSIS .Fd #include <signal.h> +.\" The following is Quite Ugly, but syntactically correct. +.\" Don't try to fix it. .Ft void -.\" can not do this with just .Fn yet -.\" .br -.\" .Po -.Fn (*signal "int sigcatch" "void (*func)(int sigraised))) (int" -.\" .Pc Ns \*(lp\*(rp +.Fn \*(lp*signal "int sigcatch" "void \*(lp*func\*(rp\*(lpint sigraised\*(rp\*(rp\*(rp \*(lpint" +.Ft void +.Fn \*(lp*bsd_signal "int sigcatch" "void \*(lp*func\*(rp\*(lpint sigraised\*(rp\*(rp\*(rp \*(lpint" .Sh DESCRIPTION The .Fn signal -facility -is a simplified interface to the more general +and +.Fn bsd_signal +facilities are simplified interfaces to the more general .Xr sigaction 2 facility. +The +.Fn bsd_signal +interface is provided for source compatibility only. +It is mainly used on systems where the standard +.Fn signal +does not have +.Bx +semantics. +On +.Ox +the two interfaces are identical. .Pp Signals allow the manipulation of a process from outside its domain as well as allowing the process to manipulate itself or diff --git a/lib/libc/gen/signal.c b/lib/libc/gen/signal.c index 21fc60f4235..d557adceea3 100644 --- a/lib/libc/gen/signal.c +++ b/lib/libc/gen/signal.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: signal.c,v 1.5 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: signal.c,v 1.6 2004/05/03 17:25:00 millert Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -40,9 +40,7 @@ static char rcsid[] = "$OpenBSD: signal.c,v 1.5 2003/06/02 20:18:35 millert Exp sigset_t __sigintr; /* shared with siginterrupt */ sig_t -signal(s, a) - int s; - sig_t a; +_signal(int s, sig_t a) { struct sigaction sa, osa; @@ -56,3 +54,6 @@ signal(s, a) return (SIG_ERR); return (osa.sa_handler); } + +__weak_alias(signal, _signal); +__weak_alias(bsd_signal, _signal); |