Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gen closefrom(3)



details:   https://anonhg.NetBSD.org/src/rev/2f9a5084b190
branches:  trunk
changeset: 567074:2f9a5084b190
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon May 31 05:25:40 2004 +0000

description:
closefrom(3)

diffstat:

 lib/libc/gen/Makefile.inc |  34 ++++++++++++++++++++++++-
 lib/libc/gen/closefrom.3  |  61 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 93 insertions(+), 2 deletions(-)

diffs (124 lines):

diff -r 32028434d210 -r 2f9a5084b190 lib/libc/gen/Makefile.inc
--- a/lib/libc/gen/Makefile.inc Mon May 31 05:06:51 2004 +0000
+++ b/lib/libc/gen/Makefile.inc Mon May 31 05:25:40 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.131 2004/05/31 05:06:51 itojun Exp $
+#      $NetBSD: Makefile.inc,v 1.132 2004/05/31 05:25:40 itojun Exp $
 #      from: @(#)Makefile.inc  8.6 (Berkeley) 5/4/95
 
 # gen sources
@@ -34,6 +34,10 @@
 SRCS+= _err.c _errx.c _sys_errlist.c _sys_nerr.c _sys_siglist.c \
        _sysconf.c _verr.c _verrx.c _vwarn.c _vwarnx.c _warn.c _warnx.c
 
+# BSD auth
+SRCS+= auth_subr.c authenticate.c login_cap.c secure_path.c pw_dup.c
+MAN+=  auth_subr.3 authenticate.3 login_cap.3 secure_path.3 pw_dup.3
+
 # machine-dependent gen sources
 # m-d Makefile.inc must include sources for:
 #      _setjmp() bswap16() bswap32() bswap64() fabs() frexp() infinity
@@ -41,7 +45,7 @@
 
 .include "${ARCHDIR}/gen/Makefile.inc"
 
-MAN+=  alarm.3 arc4random.3 basename.3 bswap.3 clock.3 confstr.3 \
+MAN+=  alarm.3 arc4random.3 basename.3 bswap.3 clock.3 closefrom.3 confstr.3 \
        ctermid.3 ctype.3 daemon.3 devname.3 directory.3 dirname.3 \
        endutxent.3 err.3 exec.3 \
        fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 fpgetmask.3 frexp.3 \
@@ -130,3 +134,29 @@
 MLINKS+=unvis.3 strunvis.3
 MLINKS+=vis.3 svis.3 vis.3 strvis.3 vis.3 strvisx.3 vis.3 strsvis.3 \
        vis.3 strsvisx.3
+
+# BSD auth
+MLINKS+=auth_subr.3 auth_open.3 auth_subr.3 auth_call.3 auth_subr.3 \
+       auth_challenge.3 auth_subr.3 auth_check_change.3 auth_subr.3 \
+       auth_check_expire.3 auth_subr.3 auth_clean.3 auth_subr.3 auth_close.3 \
+       auth_subr.3 auth_clrenv.3 auth_subr.3 auth_clroption.3 auth_subr.3 \
+       auth_clroptions.3 auth_subr.3 auth_getitem.3 auth_subr.3 auth_getpwd.3 \
+       auth_subr.3 auth_getstate.3 auth_subr.3 auth_getvalue.3 auth_subr.3 \
+       auth_set_va_list.3 auth_subr.3 auth_setdata.3 auth_subr.3 \
+       auth_setenv.3 auth_subr.3 auth_setitem.3 auth_subr.3 auth_setoption.3 \
+       auth_subr.3 auth_setpwd.3 auth_subr.3 auth_setstate.3 \
+       auth_subr.3 bsd_auth.3
+MLINKS+=authenticate.3 auth_approval.3 authenticate.3 auth_cat.3 \
+       authenticate.3 auth_checknologin.3 authenticate.3 auth_mkvalue.3 \
+       authenticate.3 auth_userchallenge.3 authenticate.3 auth_usercheck.3 \
+       authenticate.3 auth_userokay.3 authenticate.3 auth_userresponse.3 \
+       authenticate.3 auth_verify.3
+MLINKS+=login_cap.3 login_getclass.3
+MLINKS+=login_cap.3 login_getcapbool.3
+MLINKS+=login_cap.3 login_getcapnum.3
+MLINKS+=login_cap.3 login_getcapsize.3
+MLINKS+=login_cap.3 login_getcapstr.3
+MLINKS+=login_cap.3 login_getcaptime.3
+MLINKS+=login_cap.3 login_close.3
+MLINKS+=login_cap.3 setclasscontext.3
+MLINKS+=login_cap.3 setusercontext.3
diff -r 32028434d210 -r 2f9a5084b190 lib/libc/gen/closefrom.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/gen/closefrom.3  Mon May 31 05:25:40 2004 +0000
@@ -0,0 +1,61 @@
+.\"    $NetBSD: closefrom.3,v 1.1 2004/05/31 05:25:40 itojun Exp $
+.\"    $OpenBSD: closefrom.2,v 1.2 2004/01/12 20:52:09 jmc Exp $
+.\"
+.\" Copyright (c) 2004 Ted Unangst.  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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.Dd January 11, 2004
+.Dt CLOSEFROM 2
+.Os
+.Sh NAME
+.Nm closefrom
+.Nd delete many descriptors
+.Sh SYNOPSIS
+.Fd #include <unistd.h>
+.Ft int
+.Fn closefrom "int fd"
+.Sh DESCRIPTION
+The
+.Fn closefrom
+call deletes all descriptors numbered
+.Fa fd
+and higher from the per-process file descriptor table.
+It is effectively the same as calling
+.Xr close 2
+on each descriptor.
+.Sh RETURN VALUES
+Upon successful completion, a value of 0 is returned.
+Otherwise, a value of \-1 is returned and the global integer variable
+.Va errno
+is set to indicate the error.
+.Sh ERRORS
+.Fn closefrom
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+.Fa fd
+is greater than any open file descriptor.
+.It Bq Er EINTR
+An interrupt was received.
+.El
+.Sh SEE ALSO
+.Xr close 2



Home | Main Index | Thread Index | Old Index