man page macro and text revisions (-mdoc version 3)
[unix-history] / usr / src / lib / libc / sys / nfssvc.2
CommitLineData
931b8415 1.\" Copyright (c) 1989, 1991 The Regents of the University of California.
238fc413
KM
2.\" All rights reserved.
3.\"
91cff1e1 4.\" %sccs.include.redist.man%
238fc413 5.\"
931b8415 6.\" @(#)nfssvc.2 6.5 (Berkeley) %G%
238fc413 7.\"
931b8415
CL
8.Dd
9.Dt NFSSVC 2
10.Os BSD 4.4
11.Sh NAME
12.Nm nfssvc
13.Nd create a remote NFS server
14.Sh SYNOPSIS
15.Fd #include <unistd.h>
16.Ft int
17.Fn nfssvc "int sock"
18.Sh DESCRIPTION
19.Bf -symbolic
20The calling sequence of this function is expected to change
21.Ef
22.Fn Nfssvc
238fc413 23starts an
931b8415 24.Tn NFS
238fc413 25daemon listening on socket
931b8415 26.Fa sock .
238fc413 27The socket must be in the
931b8415
CL
28.Dv AF_INET
29family.
30.Sh RETURN VALUES
31Normally
32.Nm nfssvc
33does not return unless the server
d273622a 34is terminated by a signal at which time a value of 0 is returned.
931b8415
CL
35Otherwise, -1 is returned and the global variable
36.Va errno
238fc413 37is set to indicate the error.
931b8415
CL
38.Sh ERRORS
39.Fn Nfssvc
40fails if:
41.Bl -tag -width [EPERM]
42.It Bq Er EBADF
43.Fa Fd
238fc413 44is not a valid open file descriptor.
931b8415 45.It Bq Er EPERM
238fc413 46The caller is not the super-user.
931b8415
CL
47.El
48.Sh SEE ALSO
49.Xr nfsd 8
50.Sh HISTORY
51The
52.Nm
53function call is currently under development.