diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-16 01:56:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-16 01:56:05 +0000 |
commit | ddad7dd3d762af10f37311484575aa1cbc97a5b6 (patch) | |
tree | 2d0b7935e56cf6c6784b06ccd26231910b33e107 /lib | |
parent | 48c6fb77e1e7b9afdf1f971107ffc84184ad0cb3 (diff) |
zap zap zap; miod
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcompat/4.1/getpw.3 | 78 | ||||
-rw-r--r-- | lib/libcompat/4.1/vlimit.3 | 124 | ||||
-rw-r--r-- | lib/libcompat/4.1/vtimes.3 | 144 | ||||
-rw-r--r-- | lib/libcompat/Makefile | 6 |
4 files changed, 2 insertions, 350 deletions
diff --git a/lib/libcompat/4.1/getpw.3 b/lib/libcompat/4.1/getpw.3 deleted file mode 100644 index 6f3b28dff29..00000000000 --- a/lib/libcompat/4.1/getpw.3 +++ /dev/null @@ -1,78 +0,0 @@ -.\" Copyright (c) 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)getpw.3 8.1 (Berkeley) 6/4/93 -.\" -.Dd June 4, 1993 -.Dt GETPW 3 -.Os -.Sh NAME -.Nm getpw -.Nd get name from uid -.Sh SYNOPSIS -.Fn getpw uid "char *buf" -.Sh DESCRIPTION -.Bf -symbolic -The getpw function is made obsolete by -.Xr getpwuid 3 . -It is available from the compatibility library, libcompat. -.Ef -.Pp -The -.Fn getpw -function reads the file -.Pa /etc/passwd , -and if it finds -the specified -.Fa uid , -copies the password entry line into the string pointed to by -.Fa buf . -the null terminated entry line from the password database, -and appends the -.Dv NUL -character. -.Sh RETURN VALUES -The -.Fn getpw -function returns the zero if successful, otherwise -a non-zero if the entry does not exist. -.Sh FILES -.Bl -tag -width /etc/passwd - compact -.It Pa /etc/passwd -.El -.Sh SEE ALSO -.Xr getpwent 3 , -.Xr passwd 5 -.Sh HISTORY -A -.Fn getpw -function appeared in -.At v6 . diff --git a/lib/libcompat/4.1/vlimit.3 b/lib/libcompat/4.1/vlimit.3 deleted file mode 100644 index d18dfb877d0..00000000000 --- a/lib/libcompat/4.1/vlimit.3 +++ /dev/null @@ -1,124 +0,0 @@ -.\" Copyright (c) 1980, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)vlimit.3 8.1 (Berkeley) 6/4/93 -.\" -.Dd June 4, 1993 -.Dt VLIMIT 3 -.Os -.Sh NAME -.Nm vlimit -.Nd control maximum system resource consumption -.Sh SYNOPSIS -.Fd #include <sys/vlimit.h> -.Fn vlimit resource value -.Sh DESCRIPTION -.Bf -symbolic -This interface is obsoleted by -.Xr getrlimit 2 . -It is available from the compatibility library, libcompat. -.Ef -.Pp -Limits the consumption by the current process and each process -it creates to not individually exceed -.Fa value -on the specified -.Fa resource . -If -.Fa value -is specified as \-1, then the current limit is returned and the -limit is unchanged. -The resources which are currently controllable are: -.Bl -tag -width LIM_NORAISE -.It Dv LIM_NORAISE -A pseudo-limit; if set non-zero then the limits may not be raised. -Only the superuser may remove the -.Em noraise -restriction. -.It Dv LIM_CPU -the maximum -number of cpu-seconds to be used by each process -.It Dv LIM_FSIZE -the largest single file which can be created -.It Dv LIM_DATA -the maximum growth of the data+stack region via -.Xr sbrk 2 -beyond the end of the program text -.It Dv LIM_STACK -the maximum -size of the automatically extended stack region -.It Dv LIM_CORE -the size of the largest core dump that will be created. -.It Dv LIM_MAXRSS -a soft limit for the amount of physical memory (in bytes) to be given -to the program. If memory is tight, the system will prefer to take memory -from processes which are exceeding their declared -.Dv LIM_MAXRSS . -.El -.Pp -Because this information is stored in the per-process information -this system call must be executed directly by the shell if it -is to affect all future processes created by the shell; -.Xr limit -is thus a built-in command to -.Xr csh 1 . -.Pp -The system refuses to extend the data or stack space when the limits -would be exceeded in the normal way; a -.Xr break 2 -call fails if the data space limit is reached, or the process is -killed when the stack limit is reached (since the stack cannot be -extended, there is no way to send a signal!). -.Pp -A file -.Tn I/O -operation which would create a file which is too large -will cause a signal -.Dv SIGXFSZ -to be generated, this normally terminates -the process, but may be caught. -When the cpu time limit is exceeded, a signal -.Dv SIGXCPU -is sent to the -offending process; to allow it time to process the signal it is -given 5 seconds grace by raising the -.Tn CPU -time limit. -.Sh SEE ALSO -.Xr csh 1 -.Sh HISTORY -The -.Fn vlimit -function appeared in -.Bx 4.2 . -.Sh BUGS -.Dv LIM_NORAISE -no longer exists. diff --git a/lib/libcompat/4.1/vtimes.3 b/lib/libcompat/4.1/vtimes.3 deleted file mode 100644 index 75c90d0a394..00000000000 --- a/lib/libcompat/4.1/vtimes.3 +++ /dev/null @@ -1,144 +0,0 @@ -.\" $OpenBSD: vtimes.3,v 1.6 2000/04/17 03:28:32 aaron Exp $ -.\" -.\" Copyright (c) 1980, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)vtimes.3 8.1 (Berkeley) 6/4/93 -.\" -.Dd June 4, 1993 -.Dt VTIMES 3 -.Os -.Sh NAME -.Nm vtimes -.Nd get information about resource utilization -.Sh SYNOPSIS -.Fd #include <sys/vtimes.h> -.Fn vtimes "struct vtimes *par_vm" "struct vtimes *ch_vm" -.Sh DESCRIPTION -.Bf -symbolic -This interface is obsoleted by -.Xr getrusage 2 . -It is available from the compatibility library, libcompat. -.Ef -.Pp -The -.Fn vtimes -function -returns accounting information for the current process and for -the terminated child processes of the current -process. Either -.Fa par_vm -or -.Fa ch_vm -or both may be 0, in which case only the information for the pointers -which are non-zero is returned. -.Pp -After the call, each buffer contains information as defined by the -contents of the include file -.Pa /usr/include/sys/vtimes.h : -.Bd -literal -offset indent -struct vtimes { - int vm_utime; /* user time (*HZ) */ - int vm_stime; /* system time (*HZ) */ - /* divide next two by utime+stime to get averages */ - unsigned vm_idsrss; /* integral of d+s rss */ - unsigned vm_ixrss; /* integral of text rss */ - int vm_maxrss; /* maximum rss */ - int vm_majflt; /* major page faults */ - int vm_minflt; /* minor page faults */ - int vm_nswap; /* number of swaps */ - int vm_inblk; /* block reads */ - int vm_oublk; /* block writes */ -}; -.Ed -.Pp -The -.Fa vm_utime -and -.Fa vm_stime -fields give the user and system -time respectively in 60ths of a second (or 50ths if that -is the frequency of wall current in your locality). The -.Fa vm_idrss -and -.Fa vm_ixrss -measure memory usage. They are computed by integrating the number of -memory pages in use each -over -.Tn CPU -time. They are reported as though computed -discretely, adding the current memory usage (in 512 byte -pages) each time the clock ticks. If a process used 5 core -pages over 1 cpu-second for its data and stack, then -.Fa vm_idsrss -would have the value 5*60, where -.Fa vm_utime+vm_stime -would be the 60. -The -.Fa vm_idsrss -argument -integrates data and stack segment -usage, while -.Fa vm_ixrss -integrates text segment usage. -The -.Fa vm_maxrss -variable -reports the maximum instantaneous sum of the -text+data+stack core-resident page count. -.Pp -The -.Fa vm_majflt -field gives the number of page faults which -resulted in disk activity; the -.Fa vm_minflt -field gives the -number of page faults incurred in simulation of reference -bits; -.Fa vm_nswap -is the number of swaps which occurred. The -number of file system input/output events are reported in -.Fa vm_inblk -and -.Fa vm_oublk -These numbers account only for real -.Tn I/O ; -data supplied by the caching mechanism is charged only -to the first process to read or write the data. -.Sh SEE ALSO -.Xr getrusage 2 , -.Xr time 2 , -.Xr wait3 2 -.Sh HISTORY -The -.Fn vlimit -function appeared in -.Bx 4.2 . diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile index df8367187d1..84cab89c160 100644 --- a/lib/libcompat/Makefile +++ b/lib/libcompat/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2002/02/16 01:49:38 deraadt Exp $ +# $OpenBSD: Makefile,v 1.7 2002/02/16 01:56:03 deraadt Exp $ # $NetBSD: Makefile,v 1.15 1995/09/07 07:17:53 jtc Exp $ LIB= compat @@ -15,14 +15,13 @@ NOPIC= nopic ${.CURDIR}/regexp # compat 4.1 sources -# missing: tell.c vlimit.c vtimes.c SRCS= gtty.c ftime.c stty.c .if (${MACHINE} == "vax") # missing: (for vax) reset.s .endif -MAN+= ftime.3 stty.3 vlimit.3 vtimes.3 +MAN+= ftime.3 stty.3 MLINKS+=stty.3 gtty.3 @@ -39,7 +38,6 @@ MLINKS+=insque.3 remque.3 MLINKS+=lsearch.3 lfind.3 MLINKS+=re_comp.3 re_exec.3 - # compat 4.4 sources SRCS+= cuserid.c MAN+= cuserid.3 |