Bug 29552

Summary: [PATCH] No man page for pgfind()
Product: Documentation Reporter: Evan Sarmiento <kaworu>
Component: Books & ArticlesAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Evan Sarmiento 2001-08-08 23:00:02 UTC
I have written a manpage for pgfind(). Here it is below. This is just one in a series of man pages about functions from kern_proc.c I am suggesting. Thanks.

Fix: 

.\" Copyright (c) 2001 Evan Sarmiento.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/share/man/man9/pfind.9,v 1.1 2001/07/16 07:04:09 ru Exp $
.\"
.Dd August 8, 2001
.Os
.Dt PGFIND 9
.Sh NAME
.Nm pgfind 
.Nd locate a process group by pid 
.Sh SYNOPSIS
.In sys/proc.h
.Ft "struct pgrp *"
.Fn pgfind "pid_t pgid"
.Sh DESCRIPTION
.Fn pgfind 
takes a
.Fa pid
as its argument and returns a pointer to the
.Vt pgrp 
structure whose pgid is specified in the argument.
.Pp
.Sh RETURN VALUES
.Nm pgfind
returns NULL on failure or a pointer to a
.Vt pgrp 
structure on sucessful completion.
.Sh AUTHORS
This man page was written by
.An Evan Sarmiento Aq kaworu@sektor7.ath.cx .
Comment 1 dima 2001-08-09 00:27:06 UTC
Evan Sarmiento <kaworu@sektor7.ath.cx> writes:
> .\" $FreeBSD: src/share/man/man9/pfind.9,v 1.1 2001/07/16 07:04:09 ru Exp $

This should just be "$FreeBSD$".

...
> .Sh DESCRIPTION
> .Fn pgfind 
...
> .Sh RETURN VALUES
> .Nm pgfind

Why did you use .Nm here?  It should be .Fn like above.

> returns NULL on failure or a pointer to a

returns
.Dv NULL
on failure or a pointer to a

> .Vt pgrp 
> structure on sucessful completion.
> .Sh AUTHORS
> This man page was written by
> .An Evan Sarmiento Aq kaworu@sektor7.ath.cx .

Also, some of the lines have extra whitespace at the end.  It
shouldn't be there.

Thanks.
Comment 2 ru freebsd_committer freebsd_triage 2001-08-09 13:33:17 UTC
On Wed, Aug 08, 2001 at 02:53:59PM -0700, Evan Sarmiento wrote:
[...]
> .Nm pgfind 
> .Nd locate a process group by pid 
> 
`pid' and `pgid' are different things.  pgfind() locates a process
group by number.  I would write this like "by ID", or "by number".

> .Sh DESCRIPTION
+The
> .Fn pgfind 
+function
> takes a
> .Fa pid
s/pid/pgid

> as its argument and returns a pointer to the
> .Vt pgrp 
> structure whose pgid is specified in the argument.

s/pgid/.Va pg_id/

> .Pp
Gratuitous .Pp.

> .Sh RETURN VALUES
> .Nm pgfind
The
.Fn pgfind
function
> returns NULL on failure or a pointer to a
.Dv NULL
> .Vt pgrp 
> structure on sucessful completion.
> .Sh AUTHORS
> This man page was written by
> .An Evan Sarmiento Aq kaworu@sektor7.ath.cx .

If you agree with these corrections, I can commit your manpage,
and connect it to build in man9/Makefile.


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age
Comment 3 ems 2001-08-09 21:55:47 UTC
Yes,  I do accept the corrections. Commit away. Thanks a lot. :-)

-- 
-----------------------------------
Evan Sarmiento | www.open-root.org 
ems@sekt7.org  | www.sekt7.org/~ems/
-----------------------------------
Comment 4 ru freebsd_committer freebsd_triage 2001-08-10 08:20:54 UTC
State Changed
From-To: open->closed

Committed, thanks! 


Comment 5 ru freebsd_committer freebsd_triage 2001-08-10 08:20:54 UTC
Responsible Changed
From-To: freebsd-doc->ru