summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getnetgrent.314
-rw-r--r--lib/libc/gen/setjmp.317
-rw-r--r--lib/libc/gen/syslog.36
-rw-r--r--lib/libc/string/strcat.34
-rw-r--r--lib/libc/string/strchr.34
-rw-r--r--lib/libc/string/strrchr.34
-rw-r--r--lib/libc/sys/fork.24
-rw-r--r--lib/libc/sys/kill.230
8 files changed, 44 insertions, 39 deletions
diff --git a/lib/libc/gen/getnetgrent.3 b/lib/libc/gen/getnetgrent.3
index c722c3f9908..d4868fa5e7c 100644
--- a/lib/libc/gen/getnetgrent.3
+++ b/lib/libc/gen/getnetgrent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getnetgrent.3,v 1.8 1999/05/29 19:11:11 aaron Exp $
+.\" $OpenBSD: getnetgrent.3,v 1.9 1999/06/06 06:57:45 pjanzen Exp $
.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -57,13 +57,13 @@ which is described
in
.Xr netgroup 5 .
If that file does not exist, and the system supports YP,
-then the netgroup YP databased are used instead.
+then the netgroup YP databases are used instead.
The database defines a set of netgroups, each made up of one or more triples:
.Bd -literal -offset indent
(host, user, domain)
.Ed
.Pp
-that defines a combination of host, user and domain.
+that defines a combination of host, user, and domain.
Any of the three fields may be specified as
.Dq wildcards
that match any string.
@@ -73,8 +73,8 @@ The function
sets the three pointer arguments to the strings of the next member of the
current netgroup.
If any of the string pointers are
-.Fa (char *)0
-that field is considered a wildcard.
+.Fa (char *)0 ,
+those fields are considered wildcards.
.Pp
The functions
.Fn setnetgrent
@@ -98,7 +98,7 @@ If any of the
or
.Ar domain
arguments are
-.Fa (char *)0
+.Fa (char *)0 ,
those fields will match any string value in the netgroup member.
.Sh RETURN VALUES
The function
@@ -125,7 +125,7 @@ netgroup database file
The function
.Fn getnetgrent
returns pointers to dynamically allocated data areas that are
-.Xr free Ns 'd when
+.Xr free 3 Ns 'd when
the function
.Fn endnetgrent
is called.
diff --git a/lib/libc/gen/setjmp.3 b/lib/libc/gen/setjmp.3
index c94fb6a3cde..5cf0403a319 100644
--- a/lib/libc/gen/setjmp.3
+++ b/lib/libc/gen/setjmp.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: setjmp.3,v 1.7 1999/06/05 03:44:54 aaron Exp $
+.\" $OpenBSD: setjmp.3,v 1.8 1999/06/06 06:57:45 pjanzen Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -71,13 +71,12 @@ and
.Fn _setjmp
functions save their calling environment in
.Fa env .
-Each of these functions return 0.
+Each of these functions returns 0.
.Pp
The corresponding
.Fn longjmp
-functions restore the environment saved by their most recent respective
-invocations
-of the
+functions restore the environment saved by the most recent
+invocation of the respective
.Fn setjmp
function.
They then return so that program execution continues as if the corresponding
@@ -87,7 +86,7 @@ call had just returned the value specified by
.Fa val ,
instead of 0.
.Pp
-Pairs of calls may be intermixed, i.e., both
+Pairs of calls may be intermixed; i.e., both
.Fn sigsetjmp
and
.Fn siglongjmp
@@ -96,7 +95,7 @@ as well as
and
.Fn longjmp
combinations may be used in the same program. However, individual
-calls may not, e.g., the
+calls may not \(em e.g., the
.Fa env
argument to
.Fn setjmp
@@ -132,11 +131,11 @@ The
function
pairs save and restore the signal mask if the argument
.Fa savemask
-is non-zero, otherwise only the register set and the stack are saved.
+is non-zero. Otherwise, only the register set and the stack are saved.
.Sh ERRORS
If the contents of the
.Fa env
-are corrupted, or correspond to an environment that has already returned,
+are corrupted or correspond to an environment that has already returned,
the
.Fn longjmp
routine calls the routine
diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3
index 6cc56e5c710..68a12813529 100644
--- a/lib/libc/gen/syslog.3
+++ b/lib/libc/gen/syslog.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: syslog.3,v 1.5 1999/06/05 03:44:54 aaron Exp $
+.\" $OpenBSD: syslog.3,v 1.6 1999/06/06 06:57:45 pjanzen Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -253,9 +253,13 @@ always returns the previous log mask level.
.Sh EXAMPLES
.Bd -literal -offset indent -compact
syslog(LOG_ALERT, "who: internal error 23");
+
openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
+
setlogmask(LOG_UPTO(LOG_ERR));
+
syslog(LOG_INFO, "Connection from host %d", CallingHost);
+
syslog(LOG_INFO|LOG_LOCAL2, "foobar error: %m");
.Ed
.Sh SEE ALSO
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3
index 8b81e082f20..6a7c51c487c 100644
--- a/lib/libc/string/strcat.3
+++ b/lib/libc/string/strcat.3
@@ -33,13 +33,13 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strcat.3,v 1.6 1999/06/04 19:14:55 aaron Exp $
+.\" $OpenBSD: strcat.3,v 1.7 1999/06/06 06:57:52 pjanzen Exp $
.\"
.Dd July 8, 1997
.Dt STRCAT 3
.Os
.Sh NAME
-.Nm strcat,
+.Nm strcat ,
.Nm strncat
.Nd concatenate strings
.Sh SYNOPSIS
diff --git a/lib/libc/string/strchr.3 b/lib/libc/string/strchr.3
index f4b4aef9760..2980f9bc873 100644
--- a/lib/libc/string/strchr.3
+++ b/lib/libc/string/strchr.3
@@ -33,14 +33,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strchr.3,v 1.4 1999/06/04 17:26:26 aaron Exp $
+.\" $OpenBSD: strchr.3,v 1.5 1999/06/06 06:57:52 pjanzen Exp $
.\"
.Dd June 29, 1991
.Dt STRCHR 3
.Os
.Sh NAME
.Nm strchr
-.Nd locate first occurence of a character in a string
+.Nd locate first occurrence of a character in a string
.Sh SYNOPSIS
.Fd #include <string.h>
.Ft char *
diff --git a/lib/libc/string/strrchr.3 b/lib/libc/string/strrchr.3
index 4494728bdde..9f288f0b5f2 100644
--- a/lib/libc/string/strrchr.3
+++ b/lib/libc/string/strrchr.3
@@ -33,14 +33,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strrchr.3,v 1.3 1999/06/04 17:26:27 aaron Exp $
+.\" $OpenBSD: strrchr.3,v 1.4 1999/06/06 06:57:52 pjanzen Exp $
.\"
.Dd June 29, 1991
.Dt STRRCHR 3
.Os
.Sh NAME
.Nm strrchr
-.Nd locate last occurence of a character in a string
+.Nd locate last occurrence of a character in a string
.Sh SYNOPSIS
.Fd #include <string.h>
.Ft char *
diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2
index e8c51ed267e..6d3b9b3b43a 100644
--- a/lib/libc/sys/fork.2
+++ b/lib/libc/sys/fork.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fork.2,v 1.7 1999/06/05 04:16:08 aaron Exp $
+.\" $OpenBSD: fork.2,v 1.8 1999/06/06 06:57:53 pjanzen Exp $
.\" $NetBSD: fork.2,v 1.6 1995/02/27 12:32:36 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -97,7 +97,7 @@ This limit is configuration-dependent.
The limit
.Dv RLIMIT_NPROC
on the total number of
-processes under execution by a this user ID would be exceeded.
+processes under execution by the user ID would be exceeded.
.It Bq Er ENOMEM
There is insufficient swap space for the new process.
.El
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 0f1d1e3e8aa..6db4dcee96a 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: kill.2,v 1.9 1999/06/05 04:16:08 aaron Exp $
+.\" $OpenBSD: kill.2,v 1.10 1999/06/06 06:57:53 pjanzen Exp $
.\" $NetBSD: kill.2,v 1.7 1995/02/27 12:33:53 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -68,7 +68,9 @@ by
the real or effective user ID of the receiving process must match
that of the sending process or the user must have appropriate privileges
(such as given by a set-user-ID program or the user is the super-user).
-A single exception is the signal SIGCONT, which may always be sent
+A single exception is the signal
+.Dv SIGCONT ,
+which may always be sent
to any descendant of the current process.
.Bl -tag -width Ds
.It \&If Fa pid No \&is greater than zero :
@@ -96,26 +98,26 @@ the non-root user, to prevent attacks against such processes, some signal
deliveries are not permitted and return the error
.Er EPERM .
The following signals are allowed through to this class of processes:
-.Em SIGKILL ,
-.Em SIGINT ,
-.Em SIGTERM ,
-.Em SIGSTOP ,
-.Em SIGTTIN ,
-.Em SIGTTOU ,
-.Em SIGTSTP ,
-.Em SIGHUP ,
-.Em SIGUSR1 ,
-.Em SIGUSR2 .
+.Dv SIGKILL ,
+.Dv SIGINT ,
+.Dv SIGTERM ,
+.Dv SIGSTOP ,
+.Dv SIGTTIN ,
+.Dv SIGTTOU ,
+.Dv SIGTSTP ,
+.Dv SIGHUP ,
+.Dv SIGUSR1 ,
+.Dv SIGUSR2 .
.Pp
For compatibility with System V,
-if the process number is negative but not -1,
+if the process number is negative but not \-1,
the signal is sent to all processes whose process group ID
is equal to the absolute value of the process number.
This is a variant of
.Xr killpg 3 .
.Sh RETURN VALUES
Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
+Otherwise, a value of \-1 is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS