1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Remove single-space hard sentence breaks. These degrade the quality

of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
This commit is contained in:
Sheldon Hearn 2000-03-02 09:14:21 +00:00
parent 55609eba05
commit c6ff3a1bf7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57686
107 changed files with 732 additions and 366 deletions

View File

@ -103,7 +103,8 @@ by calling PacketAliasSetMode().
This function has no argument or return
value and is used to initialize internal
data structures. The following mode bits
data structures.
The following mode bits
are always set after calling
PacketAliasInit(). See section 2.3 for
the meaning of these mode bits.

View File

@ -50,7 +50,8 @@
The
.Fn arc4random
function uses the key stream generator employed by the
arc4 cipher, which uses 8*8 8 bit S-Boxes. The S-Boxes
arc4 cipher, which uses 8*8 8 bit S-Boxes.
The S-Boxes
can be in about
.if t 2\u\s71700\s10\d
.if n (2**1700)
@ -76,9 +77,11 @@ automatically initializes itself.
.Xr srandomdev 3
.Sh HISTORY
.Pa RC4
has been designed by RSA Data Security, Inc. It was posted anonymously
has been designed by RSA Data Security, Inc.
It was posted anonymously
to the USENET and was confirmed to be equivalent by several sources who
had access to the original cipher. Since
had access to the original cipher.
Since
.Pa RC4
used to be a trade secret, the cipher is now referred to as
.Pa ARC4 .

View File

@ -200,6 +200,7 @@ The functions
and
.Fn setgrent
leave their results in an internal static object and return
a pointer to that object. Subsequent calls to
a pointer to that object.
Subsequent calls to
the same function
will modify the same object.

View File

@ -99,7 +99,8 @@ The
.Fn getmntinfo
function writes the array of structures to an internal static object
and returns
a pointer to that object. Subsequent calls to
a pointer to that object.
Subsequent calls to
.Fn getmntinfo
will modify the same object.
.Pp

View File

@ -214,6 +214,7 @@ The functions
and
.Fn getpwuid ,
leave their results in an internal static object and return
a pointer to that object. Subsequent calls to
a pointer to that object.
Subsequent calls to
the same function
will modify the same object.

View File

@ -94,6 +94,7 @@ function appeared in
The
.Fn getusershell
function leaves its result in an internal static object and returns
a pointer to that object. Subsequent calls to
a pointer to that object.
Subsequent calls to
.Fn getusershell
will modify the same object.

View File

@ -96,7 +96,8 @@ detects if a lock by another process is present on the specified section.
The
.Fa size
argument is the number of contiguous bytes to be locked or
unlocked. The section to be locked or unlocked starts at the current
unlocked.
The section to be locked or unlocked starts at the current
offset in the file and extends forward for a positive size or backward
for a negative size (the preceding bytes up to but not including the
current offset). However, it is not permitted to lock a section that
@ -112,9 +113,11 @@ The sections locked with
or
.Dv F_TLOCK
may, in whole or in part, contain or be contained by a previously
locked section for the same process. When this occurs, or if adjacent
locked section for the same process.
When this occurs, or if adjacent
locked sections would occur, the sections are combined into a single
locked section. If the request would cause the number of locks to
locked section.
If the request would cause the number of locks to
exceed a system-imposed limit, the request will fail.
.Pp
.Dv F_LOCK
@ -133,15 +136,18 @@ file descriptor for the file.
.Pp
.Dv F_ULOCK
requests release (wholly or in part) one or more locked sections
controlled by the process. Locked sections will be unlocked starting
controlled by the process.
Locked sections will be unlocked starting
at the current file offset through
.Fa size
bytes or to the end of file if size is 0. When all of a locked section
is not released (that is, when the beginning or end of the area to be
unlocked falls within a locked section), the remaining portions of
that section are still locked by the process. Releasing the center
that section are still locked by the process.
Releasing the center
portion of a locked section will cause the remaining locked beginning
and end portions to become two separate locked sections. If the
and end portions to become two separate locked sections.
If the
request would cause the number of locks in the system to exceed a
system-imposed limit, the request will fail.
.Pp

View File

@ -131,7 +131,8 @@ or
in the data structure associated with the message queue.
The value of
.Va msg_qbytes
can only be increased by the super-user. Values for
can only be increased by the super-user.
Values for
.Va msg_qbytes
that exceed the system limit (MSGMNB from
.Aq Pa sys/msg.h )
@ -140,7 +141,8 @@ are silently truncated to that limit.
.It Dv IPC_RMID
Remove the message queue specified by
.Fa msqid
and destroy the data associated with it. Only the super-user or a process
and destroy the data associated with it.
Only the super-user or a process
with an effective uid equal to the
.Va msg_perm.cuid
or
@ -167,7 +169,8 @@ effective gid can match either
or
.Va msg_perm.gid .
.Sh RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, -1 is
Upon successful completion, a value of 0 is returned.
Otherwise, -1 is
returned and the global variable
.Va errno
is set to indicate the error.

View File

@ -83,7 +83,8 @@ will be received.
.El
.Pp
.Fa msgsz
specifies the maximum length of the requested message. If the received
specifies the maximum length of the requested message.
If the received
message has a length greater than
.Fa msgsz
it will be silently truncated if the
@ -100,7 +101,8 @@ depends on whether the
.Dv IPC_NOWAIT
flag is set in
.Fa msgflg
or not. If
or not.
If
.Dv IPC_NOWAIT
is set,
.Fn msgrcv

View File

@ -49,7 +49,8 @@ The
function sends a message to the message queue specified in
.Fa msqid .
.Fa msgp
points to a structure containing the message. This structure should
points to a structure containing the message.
This structure should
consist of the following members:
.Bd -literal
long mtype; /* message type */
@ -78,7 +79,8 @@ If
.Fa msgflg
has
.Dv IPC_NOWAIT
mask set in it, the call will return immediately. If
mask set in it, the call will return immediately.
If
.Fa msgflg
does not have
.Dv IPC_NOWAIT
@ -93,7 +95,8 @@ The message queue is removed, in which case -1 will be returned, and
is set to
.Er EINVAL .
.It
The caller catches a signal. The call returns with
The caller catches a signal.
The call returns with
.Va errno
set to
.Er EINTR .
@ -116,7 +119,8 @@ is set to the pid of the calling process.
is set to the current time.
.El
.Sh RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned and
Upon successful completion, 0 is returned.
Otherwise, -1 is returned and
.Va errno
is set to indicate the error.
.Sh ERRORS

View File

@ -50,7 +50,8 @@
The
.Fn rand48
family of functions generates pseudo-random numbers using a linear
congruential algorithm working on integers 48 bits in size. The
congruential algorithm working on integers 48 bits in size.
The
particular formula employed is
r(n+1) = (a * r(n) + c) mod m
where the default values are
@ -64,7 +65,8 @@ computational step is to perform a single iteration of the algorithm.
.Fn drand48
and
.Fn erand48
return values of type double. The full 48 bits of r(n+1) are
return values of type double.
The full 48 bits of r(n+1) are
loaded into the mantissa of the returned value, with the exponent set
such that the values produced lie in the interval [0.0, 1.0).
.Pp
@ -119,7 +121,8 @@ also initializes the internal buffer r(n) of
and
.Fn mrand48 ,
but here all 48 bits of the seed can be specified in an array of 3 shorts,
where the zeroth member specifies the lowest bits. Again,
where the zeroth member specifies the lowest bits.
Again,
the constant multiplicand and addend of the algorithm are
reset to the default values given above.
.Fn seed48

View File

@ -147,7 +147,8 @@ To ignore the signal
should be
.Dv SIG_IGN .
This will cause subsequent instances of the signal to be ignored
and pending instances to be discarded. If
and pending instances to be discarded.
If
.Dv SIG_IGN
is not used,
further occurrences of the signal are

View File

@ -50,7 +50,8 @@
.Fn ttyslot void
.Sh DESCRIPTION
These functions operate on the system file descriptors for terminal
type devices. These descriptors are not related to the standard
type devices.
These descriptors are not related to the standard
.Tn I/O
.Dv FILE
typedef, but refer to the special device files found in
@ -122,6 +123,7 @@ appeared in
The
.Fn ttyname
function leaves its result in an internal static object and returns
a pointer to that object. Subsequent calls to
a pointer to that object.
Subsequent calls to
.Fn ttyname
will modify the same object.

View File

@ -86,7 +86,8 @@ format and sets
.Ar e
to the ethernet address specified in the string and
.Ar h
to the hostname. This function is used to parse lines from
to the hostname.
This function is used to parse lines from
.Pa /etc/ethers
into their component parts.
.Pp
@ -96,7 +97,8 @@ function converts an
.Tn ASCII
representation of an ethernet address into an
.Ar ether_addr
structure. Likewise,
structure.
Likewise,
.Fn ether_ntoa
converts an ethernet address specified as an
.Ar ether_addr
@ -132,12 +134,14 @@ On success,
.Fn ether_ntoa
returns a pointer to a string containing an
.Tn ASCII
representation of an ethernet address. If it is unable to convert
representation of an ethernet address.
If it is unable to convert
the supplied
.Ar ether_addr
structure, it returns a
.Dv NULL
pointer. Likewise,
pointer.
Likewise,
.Fn ether_aton
returns a pointer to an
.Ar ether_addr

View File

@ -120,7 +120,8 @@ net name or
net address and type is found,
or until
.Dv EOF
is encountered. The
is encountered.
The
.Fa type
must be
.Dv AF_INET .

View File

@ -67,7 +67,8 @@ locale category used to open the message catalog; using
.Dv NL_CAT_LOCALE
conforms to the
.St -xpg4
standard. You can specify 0 for compatibility with
standard.
You can specify 0 for compatibility with
.St -xpg3 ;
when
.Fa oflag

View File

@ -54,7 +54,8 @@ mode, which chains together
successive blocks.
.SM CBC
mode protects against insertions, deletions and
substitutions of blocks. Also, regularities in the clear text will
substitutions of blocks.
Also, regularities in the clear text will
not appear in the cipher text.
.LP
Here is how to use these routines. The first parameter,
@ -66,7 +67,8 @@ is in the low bit of each byte, use
.IR des_setparity .
The second parameter,
.IR data ,
contains the data to be encrypted or decrypted. The
contains the data to be encrypted or decrypted.
The
third parameter,
.IR datalen ,
is the length in bytes of

View File

@ -31,7 +31,8 @@ which is used to decrypt the encrypted secret key stored in the database.
Both routines return 1 if they are successful in finding the key, 0 otherwise.
The keys are returned as
.SM NULL\s0-terminated,
hexadecimal strings. If the password supplied to
hexadecimal strings.
If the password supplied to
.B getsecretkey(\|)
fails to decrypt the secret key, the routine will return 1 but the
.I secretkey

View File

@ -9,7 +9,8 @@ publickey \- public key database
.LP
.B /etc/publickey
is the public key database used for secure
networking. Each entry in
networking.
Each entry in
the database consists of a network user
name (which may either refer to
a user or a hostname), followed by the user's

View File

@ -39,7 +39,8 @@ auth_destroy(auth)
A macro that destroys the authentication information associated with
.IR auth .
Destruction usually involves deallocation of private data
structures. The use of
structures.
The use of
.I auth
is undefined after calling
.BR auth_destroy(\|) .
@ -57,7 +58,8 @@ authnone_create(\|)
Create and returns an
.SM RPC
authentication handle that passes nonusable authentication
information with each remote procedure call. This is the
information with each remote procedure call.
This is the
default authentication used by
.SM RPC.
.if t .ne 10
@ -169,7 +171,8 @@ resultproc_t eachresult;
Like
.BR callrpc(\|) ,
except the call message is broadcast to all locally
connected broadcast nets. Each time it receives a
connected broadcast nets.
Each time it receives a
response, this routine calls
.BR eachresult(\|) ,
whose form is:
@ -201,7 +204,8 @@ waits for more replies; otherwise it returns with appropriate
status.
.IP
Warning: broadcast sockets are limited in size to the
maximum transfer unit of the data link. For ethernet,
maximum transfer unit of the data link.
For ethernet,
this value is 1500 bytes.
.br
.if t .ne 13
@ -252,7 +256,8 @@ clnt_destroy(clnt)
.IP
A macro that destroys the client's
.SM RPC
handle. Destruction usually involves deallocation
handle.
Destruction usually involves deallocation
of private data structures, including
.I clnt
itself. Use of
@ -282,7 +287,8 @@ Generic client creation routine.
identifies the name of the remote host where the server
is located.
.I proto
indicates which kind of transport protocol to use. The
indicates which kind of transport protocol to use.
The
currently supported values for this field are \(lqudp\(rq
and \(lqtcp\(rq.
Default timeouts are set, but can be modified using
@ -315,7 +321,8 @@ about a client object.
.I req
indicates the type of operation, and
.I info
is a pointer to the information. For both
is a pointer to the information.
For both
.SM UDP
and
.SM TCP\s0,
@ -573,7 +580,8 @@ This allows simulation of
and acquisition of
.SM RPC
overheads, such as round trip times, without any
kernel interference. This routine returns
kernel interference.
This routine returns
.SM NULL
if it fails.
.br
@ -599,7 +607,8 @@ version
.IR versnum ;
the client uses
.SM TCP/IP
as a transport. The remote program is located at Internet
as a transport.
The remote program is located at Internet
address
.IR *addr .
If
@ -651,7 +660,8 @@ version
.IR versnum ;
the client uses
.SM UDP/IP
as a transport. The remote program is located at Internet
as a transport.
The remote program is located at Internet
address
.IR addr .
If
@ -705,7 +715,8 @@ on
.IR versnum ;
the client uses
.SM UDP/IP
as a transport. The remote program is located at Internet
as a transport.
The remote program is located at Internet
address
.IR addr .
If
@ -851,7 +862,8 @@ The parameter
.I *portp
will be modified to the program's port number if the
procedure
succeeds. The definitions of other parameters are discussed
succeeds.
The definitions of other parameters are discussed
in
.B callrpc(\|)
and
@ -880,7 +892,8 @@ and
.I port
on the machine's
.B portmap
service. The value of
service.
The value of
.I protocol
is most likely
.B
@ -909,7 +922,8 @@ and
.B ports
on the machine's
.B portmap
service. This routine returns one if it succeeds, zero
service.
This routine returns one if it succeeds, zero
otherwise.
.br
.if t .ne 15
@ -1004,7 +1018,8 @@ service side's
read file descriptor bit mask; it is suitable as a template parameter
to the
.B select
system call. This is only of interest
system call.
This is only of interest
if a service implementor does not call
.BR svc_run(\|) ,
but rather does his own asynchronous event processing.
@ -1032,7 +1047,8 @@ int svc_fds;
.IP
Similar to
.BR svc_fedset(\|) ,
but limited to 32 descriptors. This
but limited to 32 descriptors.
This
interface is obsoleted by
.BR svc_fdset(\|) .
.br
@ -1143,7 +1159,8 @@ int rdfds;
.IP
Similar to
.BR svc_getreqset(\|) ,
but limited to 32 descriptors. This interface is obsoleted by
but limited to 32 descriptors.
This interface is obsoleted by
.BR svc_getreqset(\|) .
.br
.if t .ne 17
@ -1212,12 +1229,14 @@ svc_run(\|)
.fi
.ft R
.IP
This routine never returns. It waits for
This routine never returns.
It waits for
.SM RPC
requests to arrive, and calls the appropriate service
procedure using
.B svc_getreq(\|)
when one arrives. This procedure is usually waiting for a
when one arrives.
This procedure is usually waiting for a
.B select(\|)
system call to return.
.br
@ -1291,7 +1310,8 @@ svcerr_decode(xprt)
.ft R
.IP
Called by a service dispatch routine that cannot successfully
decode its parameters. See also
decode its parameters.
See also
.BR svc_getargs(\|) .
.br
.if t .ne 7
@ -1321,7 +1341,8 @@ svcerr_noprog(xprt)
.IP
Called when the desired program is not registered with the
.SM RPC
package. Service implementors usually do not need this routine.
package.
Service implementors usually do not need this routine.
.br
.if t .ne 7
.LP
@ -1337,7 +1358,8 @@ svcerr_progvers(xprt)
Called when the desired version of a program is not registered
with the
.SM RPC
package. Service implementors usually do not need this routine.
package.
Service implementors usually do not need this routine.
.br
.if t .ne 7
.LP
@ -1434,7 +1456,8 @@ is the transport's socket descriptor, and
is the transport's port number.
This routine returns
.SM NULL
if it fails. Since
if it fails.
Since
.SM TCP\s0-based
.SM RPC
uses buffered
@ -1455,7 +1478,8 @@ u_int recvsize;
.fi
.ft R
.IP
Create a service on top of any open descriptor. Typically,
Create a service on top of any open descriptor.
Typically,
this
descriptor is a connected socket for a stream protocol such
as
@ -1488,7 +1512,8 @@ which may be
in which case a new socket is created.
If the socket is not bound to a local
.SM UDP
port, then this routine binds it to an arbitrary port. Upon
port, then this routine binds it to an arbitrary port.
Upon
completion,
\fB\%xprt\->xp_sock\fR
is the transport's socket descriptor, and
@ -1516,7 +1541,8 @@ struct accepted_reply *ar;
.IP
Used for encoding
.SM RPC
reply messages. This routine is useful for users who
reply messages.
This routine is useful for users who
wish to generate
\s-1RPC\s0-style
messages without using the
@ -1536,7 +1562,8 @@ struct authunix_parms *aupp;
.IP
Used for describing
.SM UNIX
credentials. This routine is useful for users
credentials.
This routine is useful for users
who wish to generate these credentials without using the
.SM RPC
authentication package.

View File

@ -69,7 +69,8 @@ The first parameter
.Fa name
is the network name, or
.Fa netname ,
of the owner of the server process. This field usually
of the owner of the server process.
This field usually
represents a
.Fa hostname
derived from the utility routine
@ -80,21 +81,25 @@ The second field is window on the validity of
the client credential, given in seconds. A small
window is more secure than a large one, but choosing
too small of a window will increase the frequency of
resynchronizations because of clock drift. The third
resynchronizations because of clock drift.
The third
parameter
.Fa addr
is optional. If it is
.Dv NULL ,
then the authentication system will assume
that the local clock is always in sync with the server's
clock, and will not attempt resynchronizations. If an address
clock, and will not attempt resynchronizations.
If an address
is supplied, however, then the system will use the address
for consulting the remote time service whenever
resynchronization
is required. This parameter is usually the
is required.
This parameter is usually the
address of the
.Tn RPC
server itself. The final parameter
server itself.
The final parameter
.Fa ckey
is also optional. If it is
.Dv NULL ,
@ -113,7 +118,8 @@ is used on the server side for converting a
credential, which is
operating system independent, into a
.Ux
credential. This routine differs from utility routine
credential.
This routine differs from utility routine
.Fn netname2user
in that
.Fn authdes_getucred
@ -133,11 +139,13 @@ if it fails.
.Pp
.Fn Host2netname
converts from a domain-specific hostname to an
operating-system independent netname. Returns
operating-system independent netname.
Returns
.Dv TRUE
if it succeeds and
.Dv FALSE
if it fails. Inverse of
if it fails.
Inverse of
.Fn netname2host .
.Pp
.Fn Key_decryptsession
@ -168,7 +176,8 @@ is the inverse of
.Fn key_encryptsession .
.Pp
.Fn Key_encryptsession
is a keyserver interface routine. It
is a keyserver interface routine.
It
takes a server netname and a des key, and encrypts
it using the public key of the the server and the secret key
associated with the effective uid of the calling process. It
@ -176,7 +185,8 @@ is the inverse of
.Fn key_decryptsession .
.Pp
.Fn Key_gendes
is a keyserver interface routine. It
is a keyserver interface routine.
It
is used to ask the keyserver for a secure conversation key.
Choosing one
.Qq random
@ -186,14 +196,16 @@ the common ways of choosing random numbers, such as using the
current time, are very easy to guess.
.Pp
.Fn Key_setsecret
is a keyserver interface routine. It is used to set the key for
is a keyserver interface routine.
It is used to set the key for
the effective
.Fa uid
of the calling process.
.Pp
.Fn Netname2host
converts from an operating-system independent netname to a
domain-specific hostname. Returns
domain-specific hostname.
Returns
.Dv TRUE
if it succeeds and
.Dv FALSE
@ -207,16 +219,19 @@ Returns
.Dv TRUE
if it succeeds and
.Dv FALSE
if it fails. Inverse of
if it fails.
Inverse of
.Fn user2netname .
.Pp
.Fn User2netname
converts from a domain-specific username to an operating-system
independent netname. Returns
independent netname.
Returns
.Dv TRUE
if it succeeds and
.Dv FALSE
if it fails. Inverse of
if it fails.
Inverse of
.Fn netname2user .
.Sh SEE ALSO
.Xr rpc 3 ,

View File

@ -25,7 +25,8 @@ struct pointed to by
.IR timep .
Normally, the
.SM UDP
protocol is used when consulting the Time Server. The
protocol is used when consulting the Time Server.
The
.I timeout
parameter specifies how long the
routine should wait before giving
@ -37,7 +38,8 @@ however, the routine will instead use
.SM TCP
and block until a reply is received from the time server.
.LP
The routine returns 0 if it is successful. Otherwise,
The routine returns 0 if it is successful.
Otherwise,
it returns \-1 and
.B errno
is set to reflect the cause of the error.

View File

@ -544,7 +544,8 @@ No argument is converted.
.It Cm %
A
.Ql %
is written. No argument is converted. The complete conversion specification
is written. No argument is converted.
The complete conversion specification
is
.Ql %% .
.El

View File

@ -69,7 +69,8 @@ The
.Fn putc
macro acts essentially identically to
.Fn fputc ,
but is a macro that expands in-line. It may evaluate
but is a macro that expands in-line.
It may evaluate
.Fa stream
more than once, so arguments given to
.Fn putc

View File

@ -397,7 +397,8 @@ conversion.
The value
.Dv EOF
is returned if an input failure occurs before any conversion such as an
end-of-file occurs. If an error or end-of-file occurs after conversion
end-of-file occurs.
If an error or end-of-file occurs after conversion
has begun,
the number of conversions which were successfully completed is returned.
.Sh SEE ALSO

View File

@ -52,22 +52,26 @@ interface.
Input and output is mapped into logical data streams
and the physical
.Tn I/O
characteristics are concealed. The functions and macros are listed
characteristics are concealed.
The functions and macros are listed
below; more information is available from the individual man pages.
.Pp
A stream is associated with an external file (which may be a physical
device) by
.Em opening
a file, which may involve creating a new file. Creating an
a file, which may involve creating a new file.
Creating an
existing file causes its former contents to be discarded.
If a file can support positioning requests (such as a disk file, as opposed
to a terminal) then a
.Em file position indicator
associated with the stream is positioned at the start of the file (byte
zero), unless the file is opened with append mode. If append mode
zero), unless the file is opened with append mode.
If append mode
is used, the position indicator will be placed at the end-of-file.
The position indicator is maintained by subsequent reads, writes
and positioning requests. All input occurs as if the characters
and positioning requests.
All input occurs as if the characters
were read by successive calls to the
.Xr fgetc 3
function; all output takes place as if all characters were

View File

@ -322,7 +322,8 @@ and the
.Fn \&_r
variants of the other functions,
these functions leaves their result in an internal static object and return
a pointer to that object. Subsequent calls to these
a pointer to that object.
Subsequent calls to these
function will modify the same object.
.Pp
The C Standard provides no mechanism for a program to modify its current

View File

@ -79,7 +79,8 @@ two original strings with
Upon successful completion,
.Fn strxfrm
returns the length of the transformed string not including
the terminating null character. If this value is
the terminating null character.
If this value is
.Fa n
or more, the contents of
.Fa dst

View File

@ -150,7 +150,8 @@ for read and write, then calls
.Fn _thread_sys_accept .
If the call to
.Fn _thread_sys_accept
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn accept
unlocks
.Va s .

View File

@ -116,7 +116,8 @@ If mode
.Dv ISVTX
(the `sticky bit') is set on a directory,
an unprivileged user may not delete or rename
files of other users in that directory. The sticky bit may be
files of other users in that directory.
The sticky bit may be
set by any user on a directory which the user owns or has appropriate
permissions.
For more details of the properties of the sticky bit, see
@ -129,15 +130,19 @@ created within this directory are set
to be the same as the owner of that directory.
If this function is enabled, new directories will inherit
the bit from their parents. Execute bits are removed from
the file, and it will not be given to root. This behavior does not change the
the file, and it will not be given to root.
This behavior does not change the
requirements for the user to be allowed to write the file, but only the eventual
owner after it has been created. Group inheritance is not effected.
owner after it has been created.
Group inheritance is not effected.
.Pp
This feature is designed for use on fileservers serving PC users via
ftp, SAMBA, or netatalk. It provides security holes for shell users and as
ftp, SAMBA, or netatalk.
It provides security holes for shell users and as
such should not be used on shell machines, especially on home directories.
This option requires the SUIDDIR
option in the kernel to work. Only UFS filesystems support this option.
option in the kernel to work.
Only UFS filesystems support this option.
For more details of the suiddir mount option, see
.Xr mount 8 .
.Pp

View File

@ -89,7 +89,8 @@ for read and write, then calls
.Fn _thread_sys_connect .
If the call to
.Fn _thread_sys_connect
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn connect
unlocks
.Va s .

View File

@ -117,7 +117,8 @@ Descriptors that remain open are unaffected by
.Pp
Signals set to be ignored in the calling process are set to be ignored in
the
new process. Signals which are set to be caught in the calling process image
new process.
Signals which are set to be caught in the calling process image
are set to default action in the new process image.
Blocked signals remain blocked regardless of changes to the signal action.
The signal stack is reset to be undefined (see

View File

@ -263,7 +263,8 @@ but may not start or extend before the beginning of the file.
A lock is set to extend to the largest possible value of the
file offset for that file if
.Fa l_len
is set to zero. If
is set to zero.
If
.Fa l_whence
and
.Fa l_start

View File

@ -61,13 +61,15 @@ opens the file referenced by
.Fa fhp
for reading and/or writing as specified by the argument
.Fa flags
and returns the file descriptor to the calling process. The
and returns the file descriptor to the calling process.
The
.Fa flags
are specified by
.Em or Ns 'ing
together the flags used for the
.Xr open 2
call. All said flags are valid except for
call.
All said flags are valid except for
.Dv O_CREAT .
.Pp
.Fn fhstat

View File

@ -49,7 +49,8 @@ their error returns, and other common definitions and concepts.
.\"<more later...>
.Sh RETURN VALUES
Nearly all of the system calls provide an error number referenced via
the external identifier errno. This identifier is defined in
the external identifier errno.
This identifier is defined in
.Aq Pa sys/errno.h
as
.Pp
@ -59,7 +60,8 @@ as
The
.Va __error()
function returns a pointer to a field in the thread specific structure for
threads other than the initial thread. For the initial thread and
threads other than the initial thread.
For the initial thread and
non-threaded processes,
.Va __error()
returns a pointer to a global
@ -104,7 +106,8 @@ An asynchronous signal (such as
or
.Dv SIGQUIT )
was caught by the process during the execution of an interruptible
function. If the signal handler performs a normal return, the
function.
If the signal handler performs a normal return, the
interrupted function call will seem to have returned the error condition.
.It Er 5 EIO Em "Input/output error" .
Some physical input or output error occurred.
@ -264,7 +267,8 @@ A message sent on a socket was larger than the internal message buffer
or some other network limit.
.It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" .
A protocol was specified that does not support the semantics of the
socket type requested. For example, you cannot use the
socket type requested.
For example, you cannot use the
.Tn ARPA
Internet
.Tn UDP

View File

@ -92,7 +92,8 @@ bytes.
The
.Fn lseek
function allows the file offset to be set beyond the end
of the existing end-of-file of the file. If data is later written
of the existing end-of-file of the file.
If data is later written
at this point, subsequent reads of the data in the gap return
bytes of zeros (until data is actually written into the gap).
.Pp

View File

@ -133,9 +133,12 @@ Modifications are private.
Modifications are shared.
.It Dv MAP_STACK
This option is only available if your system has been compiled with
VM_STACK defined when compiling the kernel. This is the default for
i386 only. Consider adding -DVM_STACK to COPTFLAGS in your /etc/make.conf
to enable this option for other architechures. MAP_STACK implies
VM_STACK defined when compiling the kernel.
This is the default for
i386 only.
Consider adding -DVM_STACK to COPTFLAGS in your /etc/make.conf
to enable this option for other architechures.
MAP_STACK implies
MAP_ANON, and
.Fa offset
of 0.
@ -274,16 +277,19 @@ is limited to 2GB. Mmapping slightly more than 2GB doesn't work, but
it is possible to map a window of size (filesize % 2GB) for file sizes
of slightly less than 2G, 4GB, 6GB and 8GB.
.Pp
The limit is imposed for a variety of reasons. Most of them have to do
The limit is imposed for a variety of reasons.
Most of them have to do
with
.Tn FreeBSD
not wanting to use 64 bit offsets in the VM system due to
the extreme performance penalty. So
the extreme performance penalty.
So
.Tn FreeBSD
uses 32bit page indexes and
this gives
.Tn FreeBSD
a maximum of 8TB filesizes. It's actually bugs in
a maximum of 8TB filesizes.
It's actually bugs in
the filesystem code that causes the limit to be further restricted to
1TB (loss of precision when doing blockno calculations).
.Pp

View File

@ -71,7 +71,8 @@ MS_INVALIDATE Invalidate all cached data
.Ed
.Sh RETURN VALUES
If any errors occur, -1 is returned and errno is set to indicate the
error. Otherwise, a 0 value is returned.
error.
Otherwise, a 0 value is returned.
.Sh ERRORS
.Fn msync
will fail if:
@ -84,7 +85,8 @@ is not a multiple of the hardware page size.
is too large or negative.
.It Bq Er EINVAL
.Fa flags
was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed.
was both MS_ASYNC and MS_INVALIDATE.
Only one of these flags is allowed.
.It Bq Er EIO
An I/O error occurred while writing to the file system.
.Sh SEE ALSO

View File

@ -86,7 +86,8 @@ portable to older systems, so it is recommended to use the convention
for using the endpoints in the traditional manner when using a
pipe in one direction.
.Sh RETURN VALUES
On successful creation of the pipe, zero is returned. Otherwise,
On successful creation of the pipe, zero is returned.
Otherwise,
a value of -1 is returned and the variable
.Va errno
set to indicate the

View File

@ -135,7 +135,8 @@ for read, then calls
.Fn _thread_sys_read .
If the call to
.Fn _thread_sys_read
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn read
unlocks
.Va d .
@ -158,13 +159,15 @@ for read, then calls
.Fn _thread_sys_readv .
If the call to
.Fn _thread_sys_readv
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn readv
unlocks
.Va d .
.Sh RETURN VALUES
If successful, the
number of bytes actually read is returned. Upon reading end-of-file,
number of bytes actually read is returned.
Upon reading end-of-file,
zero is returned.
Otherwise, a -1 is returned and the global variable
.Va errno

View File

@ -84,7 +84,8 @@ the processor is simply halted; no reboot takes place.
This option should be used with caution.
.It Dv RB_POWEROFF
After halting, the shutdown code will do what it can to turn
of the power. This requires hardware support.
of the power.
This requires hardware support.
.It Dv RB_INITNAME
An option allowing the specification of an init program (see
.Xr init 8 )

View File

@ -37,7 +37,8 @@ If set a new process is created; otherwise changes affect the
current process.
The current implementation requires this flag to always be set.
.It RFNOWAIT
If set, the child process will be dissociated from the parent. Upon
If set, the child process will be dissociated from the parent.
Upon
exit the child will not leave a status for the parent to collect.
See
.Xr wait 2 .
@ -53,7 +54,8 @@ Is mutually exclusive with
.It RFMEM
If set, the kernel will force sharing of the entire address space.
The child
will then inherit all the shared segments the parent process owns. Other segment
will then inherit all the shared segments the parent process owns.
Other segment
types will be unaffected. Subsequent forks by the parent will then
propagate the shared data and bss between children. The stack segment
is always split. May be set only with

View File

@ -44,7 +44,8 @@
is used to lookup or change the realtime or idle priority of a process.
.Fa function
specifies the operation to be performed. RTP_LOOKUP to lookup the current priority,
specifies the operation to be performed.
RTP_LOOKUP to lookup the current priority,
and RTP_SET to set the priority.
.Fa pid
specifies the process to be used, 0 for the current process.
@ -73,11 +74,14 @@ Realtime and idle priority is inherited through fork() and exec().
A realtime process can only be preempted by a process of equal or
higher priority, or by an interrupt; idle priority processes will run only
when no other real/normal priority process is runnable. Higher real/idle priority processes
preempt lower real/idle priority processes. Processes of equal real/idle priority are run round-robin.
when no other real/normal priority process is runnable.
Higher real/idle priority processes
preempt lower real/idle priority processes.
Processes of equal real/idle priority are run round-robin.
.Sh RETURN VALUES
.Fn rtprio
will return 0 for success and -1 for all errors. The global variable
will return 0 for success and -1 for all errors.
The global variable
.Va errno
will be set to indicate the error.
.Sh ERRORS
@ -89,7 +93,8 @@ The specified
.Fa prio
was out of range.
.It Bq Er EPERM
The calling process is not allowed to set the realtime priority. Only
The calling process is not allowed to set the realtime priority.
Only
root is allowed to change the realtime priority of any process, and non-root
may only change the idle priority of the current process.
.It Bq Er ESRCH

View File

@ -46,7 +46,8 @@ out a stream socket specified by descriptor
.Pp
The
.Fa offset
argument specifies where to begin in the file. The
argument specifies where to begin in the file.
The
.Fa nbytes
argument specifies how many bytes of the file should be sent, with 0 having the special
meaning of send until the end of file has been reached.
@ -67,9 +68,11 @@ The
.Fa headers
and
.Fa tailers
pointers, if non-NULL, point to arrays of struct iovec structures. See the
pointers, if non-NULL, point to arrays of struct iovec structures.
See the
.Fn writev
system call for information on the iovec structure. The number of iovecs in these
system call for information on the iovec structure.
The number of iovecs in these
arrays is specified by
.Fa hdr_cnt
and
@ -85,7 +88,8 @@ argument is currently undefined and should be specified as 0.
.Pp
When using a socket marked for non-blocking I/O,
.Fn sendfile
may send fewer bytes than requested. In this case, the number of bytes successfully
may send fewer bytes than requested.
In this case, the number of bytes successfully
written is returned in
.Fa *sbytes
(if specified),

View File

@ -320,7 +320,8 @@ or
Any attempt to do so will be silently ignored.
.Pp
The following functions are either reentrant or not interruptible
by signals and are async-signal safe. Therefore applications may
by signals and are async-signal safe.
Therefore applications may
invoke them, without restriction, from signal-catching functions:
.Pp
Base Interfaces:

View File

@ -47,7 +47,8 @@ The
.Fn sync
function forces a write of dirty (modified) buffers
in the block buffer cache out
to disk. The kernel keeps this information in core to reduce
to disk.
The kernel keeps this information in core to reduce
the number of disk I/O transfers required by the system.
As information in the cache is lost after a system crash a
.Fn sync

View File

@ -142,7 +142,8 @@ for read and write, then calls
.Fn _thread_sys_write .
If the call to
.Fn _thread_sys_write
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn write
unlocks
.Va d .
@ -165,7 +166,8 @@ for read and write, then calls
.Fn _thread_sys_writev .
If the call to
.Fn _thread_sys_writev
would block, a context switch is performed. Before returning,
would block, a context switch is performed.
Before returning,
.Fn writev
unlocks
.Va d .

View File

@ -24,7 +24,8 @@ xdrproc_t elproc;
.IP
A filter primitive that translates between variable-length
arrays
and their corresponding external representations. The
and their corresponding external representations.
The
parameter
.I arrp
is the address of the pointer to the array, while
@ -58,7 +59,8 @@ bool_t *bp;
.IP
A filter primitive that translates between booleans (C
integers)
and their external representations. When encoding data, this
and their external representations.
When encoding data, this
filter produces values of either one or zero.
This routine returns one if it succeeds, zero otherwise.
.br
@ -78,7 +80,8 @@ A filter primitive that translates between counted byte
strings and their external representations.
The parameter
.I sp
is the address of the string pointer. The length of the
is the address of the string pointer.
The length of the
string is located at address
.IR sizep ;
strings cannot be longer than
@ -100,7 +103,8 @@ A filter primitive that translates between C characters
and their external representations.
This routine returns one if it succeeds, zero otherwise.
Note: encoded characters are not packed, and occupy 4 bytes
each. For arrays of characters, it is worthwhile to
each.
For arrays of characters, it is worthwhile to
consider
.BR xdr_bytes(\|) ,
.B xdr_opaque(\|)
@ -189,10 +193,13 @@ char *objp;
.fi
.ft R
.IP
Generic freeing routine. The first argument is the
Generic freeing routine.
The first argument is the
.SM XDR
routine for the object being freed. The second argument
is a pointer to the object itself. Note: the pointer passed
routine for the object being freed.
The second argument
is a pointer to the object itself.
Note: the pointer passed
to this routine is
.I not
freed, but what it points to
@ -392,7 +399,8 @@ stream object pointed to by
The stream's data is written to a buffer of size
.IR sendsize ;
a value of zero indicates the system should use a suitable
default. The stream's data is read from a buffer of size
default.
The stream's data is read from a buffer of size
.IR recvsize ;
it too can be set to a suitable default by passing a zero
value.
@ -439,7 +447,8 @@ The data in the output buffer is marked as a completed
record,
and the output buffer is optionally written out if
.I sendnow
is non-zero. This routine returns one if it succeeds, zero
is non-zero.
This routine returns one if it succeeds, zero
otherwise.
.br
.if t .ne 8
@ -511,7 +520,8 @@ This routine returns one if it succeeds, zero otherwise.
.IP
Warning: this routine does not understand
.SM NULL
pointers. Use
pointers.
Use
.B xdr_pointer(\|)
instead.
.br
@ -706,7 +716,8 @@ bool_t (*defaultarm) (\|); /* may equal \s-1NULL\s0 */
.IP
A filter primitive that translates between a discriminated C
.B union
and its corresponding external representation. It first
and its corresponding external representation.
It first
translates the discriminant of the union located at
.IR dscmp .
This discriminant is always an
@ -717,7 +728,8 @@ is translated. The parameter
.I choices
is a pointer to an array of
.B xdr_discrim(\|)
structures. Each structure contains an ordered pair of
structures.
Each structure contains an ordered pair of
.RI [ value , proc ].
If the union's discriminant is equal to the associated
.IR value ,

View File

@ -14,11 +14,14 @@ The
.Fn pthread_cancel
function requests that
.Fa thread
be canceled. The target thread's cancelability state and type determines
when the cancellation takes effect. When the cancellation is acted on,
be canceled.
The target thread's cancelability state and type determines
when the cancellation takes effect.
When the cancellation is acted on,
the cancellation cleanup handlers for
.Fa thread
are called. When the last cancellation cleanup handler returns,
are called.
When the last cancellation cleanup handler returns,
the thread-specific data destructor functions will be called for
.Fa thread .
When the last destructor function returns,
@ -31,7 +34,8 @@ respect to the calling thread returning from
.Pp
A status of
.Dv PTHREAD_CANCELED
is made available to any threads joining with the target. The symbolic
is made available to any threads joining with the target.
The symbolic
constant
.Dv PTHREAD_CANCELED
expands to a constant expression of type
@ -41,7 +45,8 @@ whose value matches no pointer to an object in memory nor the value
.Sh RETURN VALUES
If successful, the
.Fn pthread_cancel
functions will return zero. Otherwise an error number will be returned to
functions will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cancel

View File

@ -43,7 +43,8 @@ The
function pops the top cleanup routine off of the current threads cleanup
routine stack, and, if
.Fa execute
is non-zero, it will execute the function. If there is no cleanup routine
is non-zero, it will execute the function.
If there is no cleanup routine
then
.Fn pthread_cleanup_pop
does nothing.

View File

@ -57,7 +57,8 @@ and the current thread requires the lock on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_timedwait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_timedwait

View File

@ -54,7 +54,8 @@ on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_wait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_wait

View File

@ -45,11 +45,14 @@ The
.Fn pthread_create
function is used to create a new thread, with attributes specified by
.Fa attr ,
within a process. If
within a process.
If
.Fa attr
is NULL, the default attributes are used. If the attributes specified by
is NULL, the default attributes are used.
If the attributes specified by
.Fa attr
are modified later, the thread's attributes are not affected. Upon
are modified later, the thread's attributes are not affected.
Upon
successful completion
.Fn pthread_create
will store the ID of the created thread in the location specified by
@ -59,15 +62,18 @@ The thread is created executing
.Fa start_routine
with
.Fa arg
as its sole argument. If the
as its sole argument.
If the
.Fa start_routine
returns, the effect is as if there was an implicit call to
.Fn pthread_exit
using the return value of
.Fa start_routine
as the exit status. Note that the thread in which
as the exit status.
Note that the thread in which
.Fn main
was originally invoked differs from this. When it returns from
was originally invoked differs from this.
When it returns from
.Fn main ,
the effect is as if there was an implicit call to
.Fn exit
@ -85,7 +91,8 @@ The set of signals pending for the new thread is empty.
.Sh RETURN VALUES
If successful, the
.Fn pthread_create
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_create

View File

@ -46,20 +46,26 @@ The
function is used to indicate to the implementation that storage for the
thread
.Fa thread
can be reclaimed when the thread terminates. If
can be reclaimed when the thread terminates.
If
.Fa thread
has not terminated,
.Fn pthread_detach
will not cause it to terminate. The effect of multiple
will not cause it to terminate.
The effect of multiple
.Fn pthread_detach
calls on the same target thread is unspecified.
.Sh RETURN VALUES
If successful, the
.Fn pthread_detach
function will return zero. Otherwise an error number will be returned to
indicate the error. Note that the function does not change the value
of errno as it did for some drafts of the standard. These early drafts
also passed a pointer to pthread_t as the argument. Beware!
function will return zero.
Otherwise an error number will be returned to
indicate the error.
Note that the function does not change the value
of errno as it did for some drafts of the standard.
These early drafts
also passed a pointer to pthread_t as the argument.
Beware!
.Sh ERRORS
.Fn pthread_detach
will fail if:

View File

@ -45,12 +45,14 @@ The
.Fn pthread_exit
function terminates the calling thread and makes the value
.Fa value_ptr
available to any successful join with the terminating thread. Any
available to any successful join with the terminating thread.
Any
cancellation cleanup handlers that have been pushed and are not yet popped
are popped in the reverse order that they were pushed and then executed.
After all cancellation handlers have been executed, if the thread has any
thread-specific data, appropriate destructor functions are called in an
unspecified order. Thread termination does not release any application
unspecified order.
Thread termination does not release any application
visible process resources, including, but not limited to, mutexes and
file descriptors, nor does it perform any process level cleanup
actions, including, but not limited to, calling
@ -71,14 +73,16 @@ that was invoked as the result of an implicit or explicit call to
.Fn pthread_exit .
.Pp
After a thread has terminated, the result of access to local (auto)
variables of the thread is undefined. Thus, references to local variables
variables of the thread is undefined.
Thus, references to local variables
of the exiting thread should not be used for the
.Fn pthread_exit
.Fa value_ptr
parameter value.
.Pp
The process will exit with an exit status of 0 after the last thread has
been terminated. The behavior is as if the implementation called
been terminated.
The behavior is as if the implementation called
.Fn exit
with a zero argument at thread termination time.
.Pp

View File

@ -59,10 +59,12 @@ by the terminating thread is stored in the location referenced by
.Fa value_ptr .
When a
.Fn pthread_join
returns successfully, the target thread has been terminated. The results
returns successfully, the target thread has been terminated.
The results
of multiple simultaneous calls to
.Fn pthread_join
specifying the same target thread are undefined. If the thread calling
specifying the same target thread are undefined.
If the thread calling
.Fn pthread_join
is cancelled, then the target thread is not detached.
.Pp
@ -72,7 +74,8 @@ A thread that has exited but remains unjoined counts against
.Sh RETURN VALUES
If successful, the
.Fn pthread_join
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_join

View File

@ -44,9 +44,11 @@
The
.Fn pthread_key_create
function creates a thread-specific data key visible to all threads in the
process. Key values provided by
process.
Key values provided by
.Fn pthread_key_create
are opaque objects used to locate thread-specific data. Although the same
are opaque objects used to locate thread-specific data.
Although the same
key value may be used by different threads, the values bound to the key
by
.Fn pthread_setspecific
@ -54,19 +56,23 @@ are maintained on a per-thread basis and persist for the life of the calling
thread.
.Pp
Upon key creation, the value NULL is associated with the new key in all
active threads. Upon thread creation, the value NULL is associated with all
active threads.
Upon thread creation, the value NULL is associated with all
defined keys in the new thread.
.Pp
An optional destructor function may be associated with each key value. At
An optional destructor function may be associated with each key value.
At
thread exit, if a key value has a non-NULL destructor pointer, and the
thread has a non-NULL value associated with the key, the function pointed
to is called with the current associated value as its sole argument. The
to is called with the current associated value as its sole argument.
The
order of destructor calls is unspecified if more than one destructor exists
for a thread when it exits.
.Pp
If, after all the destructors have been called for all non-NULL values
with associated destructors, there are still some non-NULL values with
associated destructors, then the process is repeated. If, after at least
associated destructors, then the process is repeated.
If, after at least
[PTHREAD_DESTRUCTOR_ITERATIONS] iterations of destructor calls for
outstanding non-NULL values, there are still some non-NULL values with
associated destructors, the implementation stops calling destructors.
@ -75,7 +81,8 @@ If successful, the
.Fn pthread_key_create
function will store the newly created key value at the location specified by
.Fa key
and returns zero. Otherwise an error number will be returned to indicate
and returns zero.
Otherwise an error number will be returned to indicate
the error.
.Sh ERRORS
.Fn pthread_key_create

View File

@ -49,12 +49,14 @@ The thread-specific data values associated with
.Fa key
need not be NULL at the time that
.Fn pthread_key_delete
is called. It is the responsibility of the application to free any
is called.
It is the responsibility of the application to free any
application storage or perform any cleanup actions for data structures
related to the deleted key or associated thread-specific data in any threads;
this cleanup can be done either before or after
.Fn pthread_key_delete
is called. Any attempt to use
is called.
Any attempt to use
.Fa key
following the call to
.Fn pthread_key_delete
@ -62,7 +64,8 @@ results in undefined behavior.
.Pp
The
.Fn pthread_key_delete
function is callable from within destructor functions. Destructor functions
function is callable from within destructor functions.
Destructor functions
are not invoked by
.Fn pthread_key_delete .
Any destructor function that may have been associated with
@ -71,7 +74,8 @@ will no longer be called upon thread exit.
.Sh RETURN VALUES
If successful, the
.Fn pthread_key_delete
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_key_delete

View File

@ -51,7 +51,8 @@ by any thread in a process, with a given
.Fa once_control ,
will call the
.Fn init_routine
with no arguments. Subsequent calls to
with no arguments.
Subsequent calls to
.Fn pthread_once
with the same
.Fa once_control
@ -61,14 +62,16 @@ On return from
.Fn pthread_once ,
it is guaranteed that
.Fn init_routine
has completed. The
has completed.
The
.Fa once_control
parameter is used to determine whether the associated initialization
routine has been called.
.Pp
The function
.Fn pthread_once
is not a cancellation point. However, if
is not a cancellation point.
However, if
.Fn init_routine
is a cancellation point and is cancelled, the effect on
.Fa once_control is as if
@ -90,7 +93,8 @@ has automatic storage duration or is not initialized by
.Sh RETURN VALUES
If successful, the
.Fn pthread_once
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
None.

View File

@ -47,7 +47,8 @@ function associates a thread-specific value with a
.Fa key
obtained via a previous call to
.Fn pthread_key_create .
Different threads man bind different values to the same key. These values are
Different threads man bind different values to the same key.
These values are
typically pointers to blocks of dynamically allocated memory that have been
reserved for use by the calling thread.
.Pp
@ -67,7 +68,8 @@ may result in lost storage or infinite loops.
.Sh RETURN VALUES
If successful, the
.Fn pthread_setspecific
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_setspecific

View File

@ -55,13 +55,15 @@ respectively.
.Pp
The
.Fn pthread_testcancel
function creates a cancellation point in the calling thread. The
function creates a cancellation point in the calling thread.
The
.Fn pthread_testcancel
function has no effect if cancelability is disabled.
.Pp
.Ss Cancelability States
The cancelability state of a thread determines the action taken upon
receipt of a cancellation request. The thread may control cancellation in
receipt of a cancellation request.
The thread may control cancellation in
a number of ways.
.Pp
Each thread maintains its own
@ -79,7 +81,8 @@ new or pending cancellation requests may be acted upon at any time.
When cancelability is enabled and the cancelability type is
.Dv PTHREAD_CANCEL_DEFERRED ,
cancellation requests are held pending until a cancellation point (see
below) is reached. If cancelability is disabled, the setting of the
below) is reached.
If cancelability is disabled, the setting of the
cancelability type has no immediate effect as all cancellation requests
are held pending; however, once cancelability is enabled again the new
type will be in effect.
@ -114,7 +117,8 @@ If successful, the
.Fn pthread_setcancelstate
and
.Fn pthread_setcanceltype
functions will return zero. Otherwise, an error number shall be returned to
functions will return zero.
Otherwise, an error number shall be returned to
indicate the error.
.Pp
The
@ -122,22 +126,27 @@ The
and
.Fn pthread_setcanceltype
functions are used to control the points at which a thread may be
asynchronously canceled. For cancellation control to be usable in modular
asynchronously canceled.
For cancellation control to be usable in modular
fashion, some rules must be followed.
.Pp
For purposes of this discussion, consider an object to be a generalization
of a procedure. It is a set of procedures and global variables written as
a unit and called by clients not known by the object. Objects may depend
of a procedure.
It is a set of procedures and global variables written as
a unit and called by clients not known by the object.
Objects may depend
on other objects.
.Pp
First, cancelability should only be disabled on entry to an object, never
explicitly enabled. On exit from an object, the cancelability state should
explicitly enabled.
On exit from an object, the cancelability state should
always be restored to its value on entry to the object.
.Pp
This follows from a modularity argument: if the client of an object (or the
client of an object that uses that object) has disabled cancelability, it is
because the client doesn't want to have to worry about how to clean up if the
thread is canceled while executing some sequence of actions. If an object
thread is canceled while executing some sequence of actions.
If an object
is called in such a state and it enables cancelability and a cancellation
request is pending for that thread, then the thread will be canceled,
contrary to the wish of the client that disabled.
@ -146,7 +155,8 @@ Second, the cancelability type may be explicitly set to either
.Em deferred
or
.Em asynchronous
upon entry to an object. But as with the cancelability state, on exit from
upon entry to an object.
But as with the cancelability state, on exit from
an object that cancelability type should always be restored to its value on
entry to the object.
.Pp

View File

@ -98,7 +98,8 @@ and
.Fn ndaysj
provide conversions between the common "year, month, day" notation
of a date and the "number of days" representation, which is better suited
for calculations. The days are numbered from March 1st year 1 B.C., starting
for calculations.
The days are numbered from March 1st year 1 B.C., starting
with zero, so the number of a day gives the number of days since March 1st,
year 1 B.C. The conversions work for nonnegative day numbers only.
.Pp
@ -133,17 +134,21 @@ and
.Fn ndaysj
assume Julian Calendar throughout.
.Pp
The two calendars differ by the definition of the leap year. The
The two calendars differ by the definition of the leap year.
The
Julian Calendar says every year that is a multiple of four is a
leap year. The Gregorian Calendar excludes years that are multiples of
leap year.
The Gregorian Calendar excludes years that are multiples of
100 and not multiples of 400.
This means the years 1700, 1800, 1900, 2100 are not leap years
and the year 2000 is
a leap year.
The new rules were inaugurated on October 4, 1582 by deleting ten
days following this date. Most catholic countries adopted the new
days following this date.
Most catholic countries adopted the new
calendar by the end of the 16th century, whereas others stayed with
the Julian Calendar until the 20th century. The United Kingdom and
the Julian Calendar until the 20th century.
The United Kingdom and
their colonies switched on September 2, 1752. They already had to
delete 11 days.
.Pp

View File

@ -59,7 +59,8 @@ Use of the functions
and
.Nm ascftime
is strongly deprecated, since there is no way to check for a buffer
overflow condition. Use
overflow condition.
Use
.Xr strftime 3
instead.

View File

@ -66,7 +66,8 @@ function
returns 0 if the string
.Fa s
was compiled successfully; otherwise a string containing an
error message is returned. If
error message is returned.
If
.Fn re_comp
is passed 0 or a null string, it returns without changing the currently
compiled regular expression.

View File

@ -57,7 +57,8 @@ is non-NULL, the name is copied to the buffer it points to,
and that address is being returned. This buffer must provide space
for at least
.Em L_cuserid
characters. The L_cuserid constant is defined in
characters.
The L_cuserid constant is defined in
.Pa Aq stdio.h .
If

View File

@ -106,17 +106,21 @@ and
.Fn fetchPutURL
constitute the recommended interface to the
.Nm fetch
library. They examine the URL passed to them to determine the transfer
library.
They examine the URL passed to them to determine the transfer
method, and call the appropriate lower-level functions to perform the
actual transfer. The
actual transfer.
The
.Fa flags
argument is a string of characters which specify transfer options. The
argument is a string of characters which specify transfer options.
The
meaning of the individual flags is scheme-dependent, and is detailed
in the appropriate section below.
.Pp
.Fn fetchStatURL
attempts to obtain the requested document's metadata and fill in the
structure pointed to by it's second argument. The
structure pointed to by it's second argument.
The
.Fa url_stat
structure is defined as follows in
.Aq Pa fetch.h :
@ -130,9 +134,11 @@ struct url_stat {
.Pp
.Fn fetchListURL
attempts to list the contents of the directory pointed to by the URL
provided. If successful, it returns a malloced array of
provided.
If successful, it returns a malloced array of
.Fa url_ent
structures. The
structures.
The
.Fa url_ent
structure is defined as follows in
.Aq Pa fetch.h :
@ -160,7 +166,8 @@ is:
.Ed
.Pp
Note that some components of the URL are not necessarily relevant to
all URL schemes. For instance, the file scheme only needs the <scheme>
all URL schemes.
For instance, the file scheme only needs the <scheme>
and <document> components.
.Pp
The pointer returned by
@ -187,7 +194,8 @@ All of the
and
.Fn fetchPutXXX
functions return a pointer to a stream which can be used to read or
write data from or to the requested document, respectively. Note that
write data from or to the requested document, respectively.
Note that
although the implementation details of the individual access methods
vary, it can generally be assumed that a stream returned by one of the
.Fn fetchGetXXX
@ -199,7 +207,8 @@ functions is write-only.
and
.Fn fetchPutFile
provide access to documents which are files in a locally mounted file
system. Only the <document> component of the URL is used.
system.
Only the <document> component of the URL is used.
.Pp
.Fn fetchGetFile
does not accept any flags.
@ -207,7 +216,8 @@ does not accept any flags.
.Fn fetchPutFile
accepts the
.Fa a
(append to file) flag. If that flag is specified, the data written to
(append to file) flag.
If that flag is specified, the data written to
the stream returned by
.Fn fetchPutFile
will be appended to the previous contents of the file, instead of
@ -246,7 +256,8 @@ The
.Fn fetchGetHTTP
and
.Fn fetchPutHTTP
functions implement the HTTP/1.1 protocol. With a little luck, there's
functions implement the HTTP/1.1 protocol.
With a little luck, there's
even a chance that they comply with RFC2068.
.Pp
If the
@ -267,7 +278,8 @@ is currently unimplemented.
.Fn fetchParseURL
returns a pointer to a
.Fa struct url
containing the individual components of the URL. If it is
containing the individual components of the URL.
If it is
unable to allocate memory, or the URL is syntactically incorrect,
.Fn fetchParseURL
returns a NULL pointer.
@ -282,7 +294,8 @@ access the requested document, or NULL if an error occurred.
.Nm Libfetch
uses the Common Error Library
.Nm ( libcom_err )
to report errors. The error code passed to
to report errors.
The error code passed to
.Fn com_err
is one of:
.Bl -tag -width Er
@ -388,7 +401,8 @@ and
This manual page was written by
.An Dag-Erling Coïdan Smørgrav Aq des@FreeBSD.org
.Sh BUGS
Some parts of the library are not yet implemented. The most notable
Some parts of the library are not yet implemented.
The most notable
examples of this are
.Fn fetchPutHTTP ,
.Fn fetchStatHTTP ,
@ -400,27 +414,32 @@ There's no way to select a proxy at run-time other than setting the
.Ev HTTP_PROXY
or
.Ev FTP_PROXY
environment variables as appropriate. There is also no way to stop the
environment variables as appropriate.
There is also no way to stop the
FTP and HTTP functions from trying to use a proxy if these variables
are set.
.Pp
HTTP authentication doesn't work. I'm not sure that's a bug in my
HTTP authentication doesn't work.
I'm not sure that's a bug in my
code; as far as I can determine,
.Nm libfetch
handles HTTP/1.1 basic authentication correctly as outlined in
RFC2068, but I haven't been able to find an HTTP server that honors
the Authentication: header field. Also,
the Authentication: header field.
Also,
.Nm libfetch
does not attempt to interpret and respond to authentication requests
from the HTTP server.
.Pp
No attempt is made to encode spaces etc. within URLs. Spaces in the
No attempt is made to encode spaces etc. within URLs.
Spaces in the
document part of an URLshould be replaced with "%20" in HTTP URLs and
"\\ " in FTP URLs.
.Pp
Error numbers are unique only within a certain context; the error
codes used for FTP and HTTP overlap, as do those used for resolver and
system errors. For instance, error code 202 means "Command not
system errors.
For instance, error code 202 means "Command not
implemented, superfluous at this site" in an FTP context and
"Accepted" in an HTTP context.
.Pp

View File

@ -86,7 +86,8 @@ defaults to the standard ftp port of 21) and
.Fa verbose
fields. If it is successful, a
standard stream descriptor is returned which should be passed to
subsequent FTP operations. On failure, NULL is returned and
subsequent FTP operations.
On failure, NULL is returned and
.Fa retcode
will have the error code returned by the foreign server.
.Pp

View File

@ -225,7 +225,8 @@ cases. Here are reasons for returning x**0 = 1 always:
.It
Any program that already tests whether x is zero (or
infinite or \*(Na) before computing x**0 cannot care
whether 0**0 = 1 or not. Any program that depends
whether 0**0 = 1 or not.
Any program that depends
upon 0**0 to be invalid is dubious anyway since that
expression's meaning and, if invalid, its consequences
vary from one computer system to another.

View File

@ -104,7 +104,8 @@ value
(expressed as a double).
.Sh RETURN VALUES
If these functions are successful,
the computed value is returned. On the
the computed value is returned.
On the
.Tn VAX
and
.Tn Tahoe

View File

@ -85,7 +85,8 @@ specifies a non-standard location for the RADIUS client configuration file
specifies a user whose
.Xr passwd 5
entry will be used as a template to create the session environment
if the supplied username doesn't exist in local password database. The user
if the supplied username doesn't exist in local password database.
The user
will be authenticated with the supplied username and password, but his
credentials to the system will be presented as the ones for
.Ar username ,

View File

@ -14,11 +14,14 @@ The
.Fn pthread_cancel
function requests that
.Fa thread
be canceled. The target thread's cancelability state and type determines
when the cancellation takes effect. When the cancellation is acted on,
be canceled.
The target thread's cancelability state and type determines
when the cancellation takes effect.
When the cancellation is acted on,
the cancellation cleanup handlers for
.Fa thread
are called. When the last cancellation cleanup handler returns,
are called.
When the last cancellation cleanup handler returns,
the thread-specific data destructor functions will be called for
.Fa thread .
When the last destructor function returns,
@ -31,7 +34,8 @@ respect to the calling thread returning from
.Pp
A status of
.Dv PTHREAD_CANCELED
is made available to any threads joining with the target. The symbolic
is made available to any threads joining with the target.
The symbolic
constant
.Dv PTHREAD_CANCELED
expands to a constant expression of type
@ -41,7 +45,8 @@ whose value matches no pointer to an object in memory nor the value
.Sh RETURN VALUES
If successful, the
.Fn pthread_cancel
functions will return zero. Otherwise an error number will be returned to
functions will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cancel

View File

@ -43,7 +43,8 @@ The
function pops the top cleanup routine off of the current threads cleanup
routine stack, and, if
.Fa execute
is non-zero, it will execute the function. If there is no cleanup routine
is non-zero, it will execute the function.
If there is no cleanup routine
then
.Fn pthread_cleanup_pop
does nothing.

View File

@ -57,7 +57,8 @@ and the current thread requires the lock on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_timedwait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_timedwait

View File

@ -54,7 +54,8 @@ on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_wait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_wait

View File

@ -45,11 +45,14 @@ The
.Fn pthread_create
function is used to create a new thread, with attributes specified by
.Fa attr ,
within a process. If
within a process.
If
.Fa attr
is NULL, the default attributes are used. If the attributes specified by
is NULL, the default attributes are used.
If the attributes specified by
.Fa attr
are modified later, the thread's attributes are not affected. Upon
are modified later, the thread's attributes are not affected.
Upon
successful completion
.Fn pthread_create
will store the ID of the created thread in the location specified by
@ -59,15 +62,18 @@ The thread is created executing
.Fa start_routine
with
.Fa arg
as its sole argument. If the
as its sole argument.
If the
.Fa start_routine
returns, the effect is as if there was an implicit call to
.Fn pthread_exit
using the return value of
.Fa start_routine
as the exit status. Note that the thread in which
as the exit status.
Note that the thread in which
.Fn main
was originally invoked differs from this. When it returns from
was originally invoked differs from this.
When it returns from
.Fn main ,
the effect is as if there was an implicit call to
.Fn exit
@ -85,7 +91,8 @@ The set of signals pending for the new thread is empty.
.Sh RETURN VALUES
If successful, the
.Fn pthread_create
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_create

View File

@ -46,20 +46,26 @@ The
function is used to indicate to the implementation that storage for the
thread
.Fa thread
can be reclaimed when the thread terminates. If
can be reclaimed when the thread terminates.
If
.Fa thread
has not terminated,
.Fn pthread_detach
will not cause it to terminate. The effect of multiple
will not cause it to terminate.
The effect of multiple
.Fn pthread_detach
calls on the same target thread is unspecified.
.Sh RETURN VALUES
If successful, the
.Fn pthread_detach
function will return zero. Otherwise an error number will be returned to
indicate the error. Note that the function does not change the value
of errno as it did for some drafts of the standard. These early drafts
also passed a pointer to pthread_t as the argument. Beware!
function will return zero.
Otherwise an error number will be returned to
indicate the error.
Note that the function does not change the value
of errno as it did for some drafts of the standard.
These early drafts
also passed a pointer to pthread_t as the argument.
Beware!
.Sh ERRORS
.Fn pthread_detach
will fail if:

View File

@ -45,12 +45,14 @@ The
.Fn pthread_exit
function terminates the calling thread and makes the value
.Fa value_ptr
available to any successful join with the terminating thread. Any
available to any successful join with the terminating thread.
Any
cancellation cleanup handlers that have been pushed and are not yet popped
are popped in the reverse order that they were pushed and then executed.
After all cancellation handlers have been executed, if the thread has any
thread-specific data, appropriate destructor functions are called in an
unspecified order. Thread termination does not release any application
unspecified order.
Thread termination does not release any application
visible process resources, including, but not limited to, mutexes and
file descriptors, nor does it perform any process level cleanup
actions, including, but not limited to, calling
@ -71,14 +73,16 @@ that was invoked as the result of an implicit or explicit call to
.Fn pthread_exit .
.Pp
After a thread has terminated, the result of access to local (auto)
variables of the thread is undefined. Thus, references to local variables
variables of the thread is undefined.
Thus, references to local variables
of the exiting thread should not be used for the
.Fn pthread_exit
.Fa value_ptr
parameter value.
.Pp
The process will exit with an exit status of 0 after the last thread has
been terminated. The behavior is as if the implementation called
been terminated.
The behavior is as if the implementation called
.Fn exit
with a zero argument at thread termination time.
.Pp

View File

@ -59,10 +59,12 @@ by the terminating thread is stored in the location referenced by
.Fa value_ptr .
When a
.Fn pthread_join
returns successfully, the target thread has been terminated. The results
returns successfully, the target thread has been terminated.
The results
of multiple simultaneous calls to
.Fn pthread_join
specifying the same target thread are undefined. If the thread calling
specifying the same target thread are undefined.
If the thread calling
.Fn pthread_join
is cancelled, then the target thread is not detached.
.Pp
@ -72,7 +74,8 @@ A thread that has exited but remains unjoined counts against
.Sh RETURN VALUES
If successful, the
.Fn pthread_join
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_join

View File

@ -44,9 +44,11 @@
The
.Fn pthread_key_create
function creates a thread-specific data key visible to all threads in the
process. Key values provided by
process.
Key values provided by
.Fn pthread_key_create
are opaque objects used to locate thread-specific data. Although the same
are opaque objects used to locate thread-specific data.
Although the same
key value may be used by different threads, the values bound to the key
by
.Fn pthread_setspecific
@ -54,19 +56,23 @@ are maintained on a per-thread basis and persist for the life of the calling
thread.
.Pp
Upon key creation, the value NULL is associated with the new key in all
active threads. Upon thread creation, the value NULL is associated with all
active threads.
Upon thread creation, the value NULL is associated with all
defined keys in the new thread.
.Pp
An optional destructor function may be associated with each key value. At
An optional destructor function may be associated with each key value.
At
thread exit, if a key value has a non-NULL destructor pointer, and the
thread has a non-NULL value associated with the key, the function pointed
to is called with the current associated value as its sole argument. The
to is called with the current associated value as its sole argument.
The
order of destructor calls is unspecified if more than one destructor exists
for a thread when it exits.
.Pp
If, after all the destructors have been called for all non-NULL values
with associated destructors, there are still some non-NULL values with
associated destructors, then the process is repeated. If, after at least
associated destructors, then the process is repeated.
If, after at least
[PTHREAD_DESTRUCTOR_ITERATIONS] iterations of destructor calls for
outstanding non-NULL values, there are still some non-NULL values with
associated destructors, the implementation stops calling destructors.
@ -75,7 +81,8 @@ If successful, the
.Fn pthread_key_create
function will store the newly created key value at the location specified by
.Fa key
and returns zero. Otherwise an error number will be returned to indicate
and returns zero.
Otherwise an error number will be returned to indicate
the error.
.Sh ERRORS
.Fn pthread_key_create

View File

@ -49,12 +49,14 @@ The thread-specific data values associated with
.Fa key
need not be NULL at the time that
.Fn pthread_key_delete
is called. It is the responsibility of the application to free any
is called.
It is the responsibility of the application to free any
application storage or perform any cleanup actions for data structures
related to the deleted key or associated thread-specific data in any threads;
this cleanup can be done either before or after
.Fn pthread_key_delete
is called. Any attempt to use
is called.
Any attempt to use
.Fa key
following the call to
.Fn pthread_key_delete
@ -62,7 +64,8 @@ results in undefined behavior.
.Pp
The
.Fn pthread_key_delete
function is callable from within destructor functions. Destructor functions
function is callable from within destructor functions.
Destructor functions
are not invoked by
.Fn pthread_key_delete .
Any destructor function that may have been associated with
@ -71,7 +74,8 @@ will no longer be called upon thread exit.
.Sh RETURN VALUES
If successful, the
.Fn pthread_key_delete
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_key_delete

View File

@ -51,7 +51,8 @@ by any thread in a process, with a given
.Fa once_control ,
will call the
.Fn init_routine
with no arguments. Subsequent calls to
with no arguments.
Subsequent calls to
.Fn pthread_once
with the same
.Fa once_control
@ -61,14 +62,16 @@ On return from
.Fn pthread_once ,
it is guaranteed that
.Fn init_routine
has completed. The
has completed.
The
.Fa once_control
parameter is used to determine whether the associated initialization
routine has been called.
.Pp
The function
.Fn pthread_once
is not a cancellation point. However, if
is not a cancellation point.
However, if
.Fn init_routine
is a cancellation point and is cancelled, the effect on
.Fa once_control is as if
@ -90,7 +93,8 @@ has automatic storage duration or is not initialized by
.Sh RETURN VALUES
If successful, the
.Fn pthread_once
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
None.

View File

@ -47,7 +47,8 @@ function associates a thread-specific value with a
.Fa key
obtained via a previous call to
.Fn pthread_key_create .
Different threads man bind different values to the same key. These values are
Different threads man bind different values to the same key.
These values are
typically pointers to blocks of dynamically allocated memory that have been
reserved for use by the calling thread.
.Pp
@ -67,7 +68,8 @@ may result in lost storage or infinite loops.
.Sh RETURN VALUES
If successful, the
.Fn pthread_setspecific
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_setspecific

View File

@ -55,13 +55,15 @@ respectively.
.Pp
The
.Fn pthread_testcancel
function creates a cancellation point in the calling thread. The
function creates a cancellation point in the calling thread.
The
.Fn pthread_testcancel
function has no effect if cancelability is disabled.
.Pp
.Ss Cancelability States
The cancelability state of a thread determines the action taken upon
receipt of a cancellation request. The thread may control cancellation in
receipt of a cancellation request.
The thread may control cancellation in
a number of ways.
.Pp
Each thread maintains its own
@ -79,7 +81,8 @@ new or pending cancellation requests may be acted upon at any time.
When cancelability is enabled and the cancelability type is
.Dv PTHREAD_CANCEL_DEFERRED ,
cancellation requests are held pending until a cancellation point (see
below) is reached. If cancelability is disabled, the setting of the
below) is reached.
If cancelability is disabled, the setting of the
cancelability type has no immediate effect as all cancellation requests
are held pending; however, once cancelability is enabled again the new
type will be in effect.
@ -114,7 +117,8 @@ If successful, the
.Fn pthread_setcancelstate
and
.Fn pthread_setcanceltype
functions will return zero. Otherwise, an error number shall be returned to
functions will return zero.
Otherwise, an error number shall be returned to
indicate the error.
.Pp
The
@ -122,22 +126,27 @@ The
and
.Fn pthread_setcanceltype
functions are used to control the points at which a thread may be
asynchronously canceled. For cancellation control to be usable in modular
asynchronously canceled.
For cancellation control to be usable in modular
fashion, some rules must be followed.
.Pp
For purposes of this discussion, consider an object to be a generalization
of a procedure. It is a set of procedures and global variables written as
a unit and called by clients not known by the object. Objects may depend
of a procedure.
It is a set of procedures and global variables written as
a unit and called by clients not known by the object.
Objects may depend
on other objects.
.Pp
First, cancelability should only be disabled on entry to an object, never
explicitly enabled. On exit from an object, the cancelability state should
explicitly enabled.
On exit from an object, the cancelability state should
always be restored to its value on entry to the object.
.Pp
This follows from a modularity argument: if the client of an object (or the
client of an object that uses that object) has disabled cancelability, it is
because the client doesn't want to have to worry about how to clean up if the
thread is canceled while executing some sequence of actions. If an object
thread is canceled while executing some sequence of actions.
If an object
is called in such a state and it enables cancelability and a cancellation
request is pending for that thread, then the thread will be canceled,
contrary to the wish of the client that disabled.
@ -146,7 +155,8 @@ Second, the cancelability type may be explicitly set to either
.Em deferred
or
.Em asynchronous
upon entry to an object. But as with the cancelability state, on exit from
upon entry to an object.
But as with the cancelability state, on exit from
an object that cancelability type should always be restored to its value on
entry to the object.
.Pp

View File

@ -11,8 +11,10 @@ S/key \- A procedure to use one time passwords for accessing computer systems.
.SH DESCRIPTION
.I S/key
is a procedure for using one time password to authenticate access to
computer systems. It uses 64 bits of information transformed by the
MD4 algorithm. The user supplies the 64 bits in the form of 6 English
computer systems.
It uses 64 bits of information transformed by the
MD4 algorithm.
The user supplies the 64 bits in the form of 6 English
words that are generated by a secure computer.
Example use of the S/key program
.I key
@ -28,7 +30,8 @@ Example use of the S/key program
>
.sp
The programs that are part of the S/Key system are keyinit, key, and
keyinfo. Keyinit is used to get your ID set up, key is
keyinfo.
Keyinit is used to get your ID set up, key is
used to get the one time password each time,
keyinfo is used to extract information from the S/Key database.
.sp

View File

@ -33,12 +33,15 @@ where
.I permit
and
.I deny
may be followed by zero or more conditions. Comments begin with a `#\'
may be followed by zero or more conditions.
Comments begin with a `#\'
character, and extend through the end of the line. Empty lines or
lines with only comments are ignored.
.PP
A rule is matched when all conditions are satisfied. A rule without
conditions is always satisfied. For example, the last entry could
A rule is matched when all conditions are satisfied.
A rule without
conditions is always satisfied.
For example, the last entry could
be a line with just the word
.I deny
on it.
@ -102,7 +105,8 @@ use network software that discards source routing information (e.g.
a tcp wrapper).
.PP
Almost every network server must look up the client host name using the
client network address. The next obvious attack therefore is:
client network address.
The next obvious attack therefore is:
.IP "Host name spoofing (bad PTR record)"
An intruder manipulates the name server system so that the client
network address resolves to the name of a trusted host. Given the
@ -115,7 +119,8 @@ network software that verifies that the hostname resolves to the client
network address (e.g. a tcp wrapper).
.PP
Some applications, such as the UNIX login program, must look up the
client network address using the client host name. In addition to the
client network address using the client host name.
In addition to the
previous two attacks, this opens up yet another possibility:
.IP "Host address spoofing (extra A record)"
An intruder manipulates the name server system so that the client host
@ -125,7 +130,8 @@ Remedies: (1) do not permit UNIX passwords with network logins; (2)
the skeyaccess() routines ignore network addresses that appear to
belong to someone else.
.SH DIAGNOSTICS
Syntax errors are reported to the syslogd. When an error is found
Syntax errors are reported to the syslogd.
When an error is found
the rule is skipped.
.SH FILES
/etc/skey.access, password control table

View File

@ -109,7 +109,8 @@ again with EV_NOHOOK set to actually save the value. The predefined function
.Fn env_noset
may be specified to refuse all attempts to set a variable.
.Pp
The unset hook is invoked when an attempt is made to unset a variable. If it
The unset hook is invoked when an attempt is made to unset a variable.
If it
returns zero, the variable will be unset. The predefined function
.Fa env_nounset
may be used to prevent a variable being unset.
@ -423,7 +424,8 @@ File access via NFS.
.It cd9660_fsops
ISO 9660 (CD-ROM) filesystem.
.It zipfs_fsops
Stacked filesystem supporting gzipped files. When trying the zipfs filesystem,
Stacked filesystem supporting gzipped files.
When trying the zipfs filesystem,
.Nm
appends
.Li .gz

View File

@ -58,7 +58,8 @@ returns a pointer to the next logical line from the stream referenced by
.Fa stream .
This string is
.Dv NUL
terminated and it is dynamicaly allocated on each invocation. It is the
terminated and it is dynamicaly allocated on each invocation.
It is the
responsibility of the caller to free the pointer.
.Pp
By default, if a character is escaped, both it and the preceeding escape

View File

@ -186,7 +186,8 @@ the login session will be terminated.
.It setenv list A comma-separated list of environment variables and
values to which they are to be set.
.It shell prog Session shell to execute rather than the
shell specified in the passwd file. The SHELL environment variable will
shell specified in the passwd file.
The SHELL environment variable will
contain the shell specified in the password file.
.It term string Default terminal type if not able to determine from
other means.

View File

@ -146,7 +146,8 @@ or
.Fn login_getuserclass .
If the referenced user has no login class specified in
.Pa /etc/master.passwd ,
the class name is NULL or an empty string. If the class
the class name is NULL or an empty string.
If the class
specified does not exist in the database, each of these
functions will search for a record with an id of "default",
with that name returned in the

View File

@ -134,7 +134,8 @@
is a library that enables the programmer access to the graphics
modes supported by the console driver (syscons). The library takes care of
programming the actual video hardware, and provides a number of simple
functions to do various graphic operations. There is also support for a
functions to do various graphic operations.
There is also support for a
mouse via the standard mouse system in
.Fx ,
see
@ -143,7 +144,8 @@ including the ability to transparently have a mouse pointer superimposed on
the graphic image currently being worked on.
The library takes care of screen switching by storing the current image in
memory before switching to another virtual console, and restoring when the
user switches back. This allows several graphic applications at once, but
user switches back.
This allows several graphic applications at once, but
on different virtual consoles.
Below is a short description of the various functions:
@ -199,7 +201,8 @@ input mode, the function will not block even if there is no input data,
and returns 0.
.Pp
.Fn VGLMouseInit
initialize the mouse. The optional on-screen mouse pointer is shown if the
initialize the mouse.
The optional on-screen mouse pointer is shown if the
argument is
.Dv VGL_MOUSESHOW .
.Pp
@ -212,7 +215,8 @@ or hides the mouse pointer if the argument is
.Fn VGLMouseStatus
returns the current mouse pointer coordinates and button state in
.Va x , y ,
buttons. The return value reflects if the mouse pointer
buttons.
The return value reflects if the mouse pointer
is currently shown on screen or not.
.Pp
.Fn VGLMouseSetImage

View File

@ -29,7 +29,8 @@ The library also supports reading and writing files in
(.gz) format
with an interface similar to that of stdio.
.LP
The library does not install any signal handler. The decoder checks
The library does not install any signal handler.
The decoder checks
the consistency of the compressed data, so the library should never
crash even in case of corrupted input.
.LP

View File

@ -264,7 +264,8 @@ cases. Here are reasons for returning x**0 = 1 always:
.It
Any program that already tests whether x is zero (or
infinite or \*(Na) before computing x**0 cannot care
whether 0**0 = 1 or not. Any program that depends
whether 0**0 = 1 or not.
Any program that depends
upon 0**0 to be invalid is dubious anyway since that
expression's meaning and, if invalid, its consequences
vary from one computer system to another.

View File

@ -131,7 +131,8 @@ value
.Fa x .
.Sh RETURN VALUES
If these functions are successful,
the computed value is returned. On the
the computed value is returned.
On the
.Tn VAX
and
.Tn Tahoe

View File

@ -14,11 +14,14 @@ The
.Fn pthread_cancel
function requests that
.Fa thread
be canceled. The target thread's cancelability state and type determines
when the cancellation takes effect. When the cancellation is acted on,
be canceled.
The target thread's cancelability state and type determines
when the cancellation takes effect.
When the cancellation is acted on,
the cancellation cleanup handlers for
.Fa thread
are called. When the last cancellation cleanup handler returns,
are called.
When the last cancellation cleanup handler returns,
the thread-specific data destructor functions will be called for
.Fa thread .
When the last destructor function returns,
@ -31,7 +34,8 @@ respect to the calling thread returning from
.Pp
A status of
.Dv PTHREAD_CANCELED
is made available to any threads joining with the target. The symbolic
is made available to any threads joining with the target.
The symbolic
constant
.Dv PTHREAD_CANCELED
expands to a constant expression of type
@ -41,7 +45,8 @@ whose value matches no pointer to an object in memory nor the value
.Sh RETURN VALUES
If successful, the
.Fn pthread_cancel
functions will return zero. Otherwise an error number will be returned to
functions will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cancel

View File

@ -43,7 +43,8 @@ The
function pops the top cleanup routine off of the current threads cleanup
routine stack, and, if
.Fa execute
is non-zero, it will execute the function. If there is no cleanup routine
is non-zero, it will execute the function.
If there is no cleanup routine
then
.Fn pthread_cleanup_pop
does nothing.

View File

@ -57,7 +57,8 @@ and the current thread requires the lock on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_timedwait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_timedwait

View File

@ -54,7 +54,8 @@ on
.Sh RETURN VALUES
If successful, the
.Fn pthread_cond_wait
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_cond_wait

View File

@ -45,11 +45,14 @@ The
.Fn pthread_create
function is used to create a new thread, with attributes specified by
.Fa attr ,
within a process. If
within a process.
If
.Fa attr
is NULL, the default attributes are used. If the attributes specified by
is NULL, the default attributes are used.
If the attributes specified by
.Fa attr
are modified later, the thread's attributes are not affected. Upon
are modified later, the thread's attributes are not affected.
Upon
successful completion
.Fn pthread_create
will store the ID of the created thread in the location specified by
@ -59,15 +62,18 @@ The thread is created executing
.Fa start_routine
with
.Fa arg
as its sole argument. If the
as its sole argument.
If the
.Fa start_routine
returns, the effect is as if there was an implicit call to
.Fn pthread_exit
using the return value of
.Fa start_routine
as the exit status. Note that the thread in which
as the exit status.
Note that the thread in which
.Fn main
was originally invoked differs from this. When it returns from
was originally invoked differs from this.
When it returns from
.Fn main ,
the effect is as if there was an implicit call to
.Fn exit
@ -85,7 +91,8 @@ The set of signals pending for the new thread is empty.
.Sh RETURN VALUES
If successful, the
.Fn pthread_create
function will return zero. Otherwise an error number will be returned to
function will return zero.
Otherwise an error number will be returned to
indicate the error.
.Sh ERRORS
.Fn pthread_create

View File

@ -46,20 +46,26 @@ The
function is used to indicate to the implementation that storage for the
thread
.Fa thread
can be reclaimed when the thread terminates. If
can be reclaimed when the thread terminates.
If
.Fa thread
has not terminated,
.Fn pthread_detach
will not cause it to terminate. The effect of multiple
will not cause it to terminate.
The effect of multiple
.Fn pthread_detach
calls on the same target thread is unspecified.
.Sh RETURN VALUES
If successful, the
.Fn pthread_detach
function will return zero. Otherwise an error number will be returned to
indicate the error. Note that the function does not change the value
of errno as it did for some drafts of the standard. These early drafts
also passed a pointer to pthread_t as the argument. Beware!
function will return zero.
Otherwise an error number will be returned to
indicate the error.
Note that the function does not change the value
of errno as it did for some drafts of the standard.
These early drafts
also passed a pointer to pthread_t as the argument.
Beware!
.Sh ERRORS
.Fn pthread_detach
will fail if:

View File

@ -45,12 +45,14 @@ The
.Fn pthread_exit
function terminates the calling thread and makes the value
.Fa value_ptr
available to any successful join with the terminating thread. Any
available to any successful join with the terminating thread.
Any
cancellation cleanup handlers that have been pushed and are not yet popped
are popped in the reverse order that they were pushed and then executed.
After all cancellation handlers have been executed, if the thread has any
thread-specific data, appropriate destructor functions are called in an
unspecified order. Thread termination does not release any application
unspecified order.
Thread termination does not release any application
visible process resources, including, but not limited to, mutexes and
file descriptors, nor does it perform any process level cleanup
actions, including, but not limited to, calling
@ -71,14 +73,16 @@ that was invoked as the result of an implicit or explicit call to
.Fn pthread_exit .
.Pp
After a thread has terminated, the result of access to local (auto)
variables of the thread is undefined. Thus, references to local variables
variables of the thread is undefined.
Thus, references to local variables
of the exiting thread should not be used for the
.Fn pthread_exit
.Fa value_ptr
parameter value.
.Pp
The process will exit with an exit status of 0 after the last thread has
been terminated. The behavior is as if the implementation called
been terminated.
The behavior is as if the implementation called
.Fn exit
with a zero argument at thread termination time.
.Pp

Some files were not shown because too many files have changed in this diff Show More