Skip to content

Commit

Permalink
Use .Dv and start sentences on a new line.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Wildner committed Sep 8, 2007
1 parent cbf2eda commit 632f95c
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 79 deletions.
6 changes: 4 additions & 2 deletions lib/libc/compat-43/killpg.2
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)killpg.2 8.1 (Berkeley) 6/2/93
.\" $FreeBSD: src/lib/libc/compat-43/killpg.2,v 1.6.2.4 2003/03/15 15:11:05 trhodes Exp $
.\" $DragonFly: src/lib/libc/compat-43/killpg.2,v 1.2 2003/06/17 04:26:41 dillon Exp $
.\" $DragonFly: src/lib/libc/compat-43/killpg.2,v 1.3 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd June 2, 1993
.Dt KILLPG 2
Expand Down Expand Up @@ -66,7 +66,9 @@ sends the signal to the sending process's process group.
The sending process and members of the process group must
have the same effective user ID, or
the sender must be the super-user.
As a single special case the continue signal SIGCONT may be sent
As a single special case the continue signal
.Dv SIGCONT
may be sent
to any process that is a descendant of the current process.
.Sh RETURN VALUES
.Rv -std killpg
Expand Down
6 changes: 4 additions & 2 deletions lib/libc/gen/alarm.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)alarm.3 8.2 (Berkeley) 4/19/94
.\" $FreeBSD: src/lib/libc/gen/alarm.3,v 1.9.2.6 2003/02/23 19:45:53 trhodes Exp $
.\" $DragonFly: src/lib/libc/gen/alarm.3,v 1.2 2003/06/17 04:26:42 dillon Exp $
.\" $DragonFly: src/lib/libc/gen/alarm.3,v 1.3 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd April 19, 1994
.Dt ALARM 3
Expand Down Expand Up @@ -65,7 +65,9 @@ will supersede the prior call.
The request
.Fn alarm "0"
voids the current
alarm and the signal SIGALRM will not be delivered.
alarm and the signal
.Dv SIGALRM
will not be delivered.
.Pp
Due to
.Xr setitimer 2
Expand Down
11 changes: 7 additions & 4 deletions lib/libc/gen/getpass.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)getpass.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD: src/lib/libc/gen/getpass.3,v 1.6.2.4 2002/06/30 14:01:45 des Exp $
.\" $DragonFly: src/lib/libc/gen/getpass.3,v 1.2 2003/06/17 04:26:42 dillon Exp $
.\" $DragonFly: src/lib/libc/gen/getpass.3,v 1.3 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd June 4, 1993
.Dt GETPASS 3
Expand All @@ -56,8 +56,9 @@ If this file is not accessible,
displays the prompt on the standard error output and reads from the standard
input.
.Pp
The password may be up to _PASSWORD_LEN (currently 128)
characters in length.
The password may be up to
.Dv _PASSWORD_LEN
(currently 128) characters in length.
Any additional
characters and the terminating newline character are discarded.
.Pp
Expand Down Expand Up @@ -93,6 +94,8 @@ The calling process should zero the password as soon as possible to
avoid leaving the cleartext password visible in the process's address
space.
.Pp
Upon receipt of a SIGTSTP, the input buffer will be flushed, so any
Upon receipt of a
.Dv SIGTSTP ,
the input buffer will be flushed, so any
partially typed password must be retyped when the process
continues.
13 changes: 8 additions & 5 deletions lib/libc/gen/signal.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)signal.3 8.3 (Berkeley) 4/19/94
.\" $FreeBSD: src/lib/libc/gen/signal.3,v 1.17.2.9 2003/03/13 18:05:37 trhodes Exp $
.\" $DragonFly: src/lib/libc/gen/signal.3,v 1.5 2006/05/26 19:39:36 swildner Exp $
.\" $DragonFly: src/lib/libc/gen/signal.3,v 1.6 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd April 19, 1994
.Dt SIGNAL 3
Expand Down Expand Up @@ -64,7 +64,8 @@ facility.
.Pp
Signals allow the manipulation of a process from outside its
domain as well as allowing the process to manipulate itself or
copies of itself (children). There are two general types of signals:
copies of itself (children).
There are two general types of signals:
those that cause termination of a process and those that do not.
Signals which cause termination of a program might result from
an irrecoverable error or might be the result of a user at a terminal
Expand All @@ -91,7 +92,7 @@ function allows for a signal to be caught, to be ignored, or to generate
an interrupt.
These signals are defined in the file
.In signal.h :
.Bl -column SIGVTALARMXX "create core imagexxx"
.Bl -column ".Dv SIGCKPTEXIT" "create core imagexxx"
.It Sy "Name Default Action Description"
.It Dv SIGHUP Ta "terminate process" Ta "terminal line hangup"
.It Dv SIGINT Ta "terminate process" Ta "interrupt program"
Expand Down Expand Up @@ -210,7 +211,9 @@ for a list of functions
that are considered safe for use in signal handlers.
.Sh RETURN VALUES
The previous action is returned on a successful call.
Otherwise, SIG_ERR is returned and the global variable
Otherwise,
.Dv SIG_ERR
is returned and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
Expand All @@ -229,7 +232,7 @@ is not a valid signal number.
An attempt is made to ignore or supply a handler for
.Dv SIGKILL
or
.Ev SIGSTOP .
.Dv SIGSTOP .
.El
.Sh SEE ALSO
.Xr kill 1 ,
Expand Down
8 changes: 5 additions & 3 deletions lib/libc/gen/sleep.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)sleep.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD: src/lib/libc/gen/sleep.3,v 1.12.2.3 2001/12/14 18:33:51 ru Exp $
.\" $DragonFly: src/lib/libc/gen/sleep.3,v 1.2 2003/06/17 04:26:42 dillon Exp $
.\" $DragonFly: src/lib/libc/gen/sleep.3,v 1.3 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd February 13, 1998
.Dt SLEEP 3
Expand Down Expand Up @@ -62,12 +62,14 @@ by pausing for
seconds or until a signal occurs.
Consequently, in this implementation,
sleeping has no effect on the state of process timers,
and there is no special handling for SIGALRM.
and there is no special handling for
.Dv SIGALRM .
.Sh RETURN VALUES
If the
.Fn sleep
function returns because the requested time has elapsed, the value
returned will be zero. If the
returned will be zero.
If the
.Fn sleep
function returns due to the delivery of a signal, the value returned
will be the unslept amount (the requested time minus the time actually
Expand Down
25 changes: 15 additions & 10 deletions lib/libc/gen/tcsetattr.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)tcsetattr.3 8.3 (Berkeley) 1/2/94
.\" $FreeBSD: src/lib/libc/gen/tcsetattr.3,v 1.6.2.4 2002/12/29 16:35:34 schweikh Exp $
.\" $DragonFly: src/lib/libc/gen/tcsetattr.3,v 1.4 2007/06/30 19:03:52 swildner Exp $
.\" $DragonFly: src/lib/libc/gen/tcsetattr.3,v 1.5 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd January 2, 1994
.Dt TCSETATTR 3
Expand Down Expand Up @@ -171,9 +171,14 @@ terminal interface.
Unless otherwise noted for a specific command, these functions are restricted
from use by background processes.
Attempts to perform these operations shall cause the process group to be sent
a SIGTTOU signal.
If the calling process is blocking or ignoring SIGTTOU signals, the process
is allowed to perform the operation and the SIGTTOU signal is not sent.
a
.Dv SIGTTOU
signal.
If the calling process is blocking or ignoring
.Dv SIGTTOU
signals, the process is allowed to perform the operation and the
.Dv SIGTTOU
signal is not sent.
.Pp
In all the functions, although
.Fa fd
Expand Down Expand Up @@ -220,22 +225,22 @@ field is created by
.Em or Ns 'ing
the following values, as specified in the include file
.In termios.h .
.Bl -tag -width "TCSADRAIN"
.It Fa TCSANOW
.Bl -tag -width ".Dv TCSADRAIN"
.It Dv TCSANOW
The change occurs immediately.
.It Fa TCSADRAIN
.It Dv TCSADRAIN
The change occurs after all output written to
.Fa fd
has been transmitted to the terminal.
This value of
.Fa action
should be used when changing parameters that affect output.
.It Fa TCSAFLUSH
.It Dv TCSAFLUSH
The change occurs after all output written to
.Fa fd
has been transmitted to the terminal.
Additionally, any input that has been received but not read is discarded.
.It Fa TCSASOFT
.It Dv TCSASOFT
If this value is
.Em or Ns 'ed
into the
Expand Down Expand Up @@ -327,7 +332,7 @@ and
.Fn cfsetspeed
functions,
as well as the
.Li TCSASOFT
.Dv TCSASOFT
option to the
.Fn tcsetattr
function are extensions to the
Expand Down
5 changes: 3 additions & 2 deletions lib/libc/gen/usleep.3
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)usleep.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD: src/lib/libc/gen/usleep.3,v 1.10.2.7 2001/12/14 18:33:51 ru Exp $
.\" $DragonFly: src/lib/libc/gen/usleep.3,v 1.2 2003/06/17 04:26:42 dillon Exp $
.\" $DragonFly: src/lib/libc/gen/usleep.3,v 1.3 2007/09/08 20:50:49 swildner Exp $
.\"
.Dd February 13, 1998
.Dt USLEEP 3
Expand Down Expand Up @@ -62,7 +62,8 @@ by pausing for
microseconds or until a signal occurs.
Consequently, in this implementation,
sleeping has no effect on the state of process timers,
and there is no special handling for SIGALRM.
and there is no special handling for
.Dv SIGALRM .
.Sh RETURN VALUES
.Rv -std usleep
.Sh ERRORS
Expand Down
7 changes: 4 additions & 3 deletions lib/libc/sys/kill.2
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
.\" $FreeBSD: src/lib/libc/sys/kill.2,v 1.10.2.7 2001/12/14 18:34:01 ru Exp $
.\" $DragonFly: src/lib/libc/sys/kill.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
.\" $DragonFly: src/lib/libc/sys/kill.2,v 1.3 2007/09/08 20:50:50 swildner Exp $
.\"
.Dd April 19, 1994
.Dt KILL 2
Expand Down Expand Up @@ -70,8 +70,9 @@ by
the real or effective user ID of the receiving process must match
that of the sending process or the user must have appropriate privileges
(such as given by a set-user-ID program or the user is the super-user).
A single exception is the signal SIGCONT, which may always be sent
to any descendant of the current process.
A single exception is the signal
.Dv SIGCONT ,
which may always be sent to any descendant of the current process.
.Bl -tag -width Ds
.It \&If Fa pid No \&is greater than zero :
.Fa Sig
Expand Down
57 changes: 36 additions & 21 deletions lib/libc/sys/rfork.2
Expand Up @@ -4,7 +4,7 @@
.\" use of this page comes from Rob Pike <rob@plan9.att.com>.
.\"
.\" $FreeBSD: src/lib/libc/sys/rfork.2,v 1.11.2.11 2002/07/30 19:04:25 silby Exp $
.\" $DragonFly: src/lib/libc/sys/rfork.2,v 1.5 2006/03/22 10:18:47 swildner Exp $
.\" $DragonFly: src/lib/libc/sys/rfork.2,v 1.6 2007/09/08 20:50:50 swildner Exp $
.\"
.Dd January 12, 1996
.Dt RFORK 2
Expand Down Expand Up @@ -34,48 +34,54 @@ to open and close files for other processes),
and open files.
.Fa Flags
is the logical OR of some subset of:
.Bl -tag -width "RFCNAMEG" -compact -offset indent
.It RFPROC
.Bl -tag -width ".Dv RFLINUXTHPN" -compact -offset indent
.It Dv RFPROC
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
.It Dv RFNOWAIT
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 .
.It RFFDG
.It Dv RFFDG
If set, the invoker's file descriptor table (see
.Xr intro 2 )
is copied; otherwise the two processes share a
single table.
.It RFCFDG
.It Dv RFCFDG
If set, the new process starts with a clean file descriptor table.
Is mutually exclusive with
.Dv RFFDG .
.It RFMEM
.It Dv RFMEM
If set, the kernel will force sharing of the entire address space,
typically by sharing the hardware page table directly.
The child
will thus inherit and share all the segments the parent process owns,
whether they are normally shareable or not. The stack segment is
whether they are normally shareable or not.
The stack segment is
not split (both the parent and child return on the same stack) and thus
.Fn rfork
with the RFMEM flag may not generally be called directly from high level
with the
.Dv RFMEM
flag may not generally be called directly from high level
languages including C.
May be set only with
.Dv RFPROC .
A helper function is provided to assist with this problem and will cause
the new process to run on the provided stack. See
the new process to run on the provided stack.
See
.Fn rfork_thread 3
for information.
.It RFSIGSHARE
.It Dv RFSIGSHARE
If set, the kernel will force sharing the sigacts structure between the
child and the parent.
.It RFLINUXTHPN
If set, the kernel will return SIGUSR1 instead of SIGCHILD upon thread
exit for the child. This is intended to mimic certain Linux clone behaviour.
.It Dv RFLINUXTHPN
If set, the kernel will return
.Dv SIGUSR1
instead of SIGCHILD upon thread exit for the child.
This is intended to mimic certain Linux clone behaviour.
.El
.Pp
File descriptors in a shared file descriptor table are kept
Expand Down Expand Up @@ -106,9 +112,9 @@ Upon successful completion,
.Fn rfork
returns a value
of 0 to the child process and returns the process ID of the child
process to the parent process. Otherwise, a value of -1 is returned
to the parent process, no child process is created, and the global
variable
process to the parent process.
Otherwise, a value of -1 is returned to the parent process, no
child process is created, and the global variable
.Va errno
is set to indicate the error.
.Sh ERRORS
Expand Down Expand Up @@ -140,9 +146,15 @@ the soft resource limit corresponding to the resource parameter
would be exceeded (see
.Xr getrlimit 2 ) .
.It Bq Er EINVAL
The RFPROC flag was not specified.
The
.Dv RFPROC
flag was not specified.
.It Bq Er EINVAL
Both the RFFDG and the RFCFDG flags were specified.
Both the
.Dv RFFDG
and the
.Dv RFCFDG
flags were specified.
.It Bq Er ENOMEM
There is insufficient swap space for the new process.
.El
Expand All @@ -162,11 +174,14 @@ does not yet implement a native
.Fn clone
library call, and the current pthreads implementation does not use
.Fn rfork
with RFMEM. A native port of the linux threads library,
with
.Dv RFMEM .
A native port of the linux threads library,
.Pa /usr/ports/devel/linuxthreads ,
contains a working
.Fn clone
call that utilizes RFMEM.
call that utilizes
.Dv RFMEM .
The
.Fn rfork_thread
library call can often be used instead of
Expand Down

0 comments on commit 632f95c

Please sign in to comment.