Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2001 09:20:01 -0700 (PDT)
From:      Dima Dorfman <dima@unixfreak.org>
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/29571: [PATCH] No man page for pgrp kernel functions 
Message-ID:  <200109031620.f83GK1G84487@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/29571; it has been noted by GNATS.

From: Dima Dorfman <dima@unixfreak.org>
To: Evan Sarmiento <kaworu@sektor7.ath.cx>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: docs/29571: [PATCH] No man page for pgrp kernel functions 
Date: Mon, 03 Sep 2001 09:15:51 -0700

 Evan Sarmiento <kaworu@sektor7.ath.cx> wrote:
 > >Description:
 > No manpage for the pgrp() functions loacted in /usr/src/sys/kern/kern_proc.c.
 >  This manpages references three functions,
 > enterpgrp, leavepgrp, and pgdelete.
 > >How-To-Repeat:
 > 
 > >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.
 > .\"
 > .\"
 > .Dd August 8, 2001
 > .Os
 > .Dt PGFIND 9
 
 This is not pgfind(9).
 
 > .Sh NAME
 > .Nm enterpgrp, leavepgrp, pgdelete 
 
 You need whitespace in front of punctuation, as so:
 
 	.Nm enterpgrp , leavepgrp , pgdelete
 
 And you don't need whitespace at the end of the line.
 
 > .Nd functions for manipulating process groups 
 > .Sh SYNOPSIS
 > .In sys/proc.h
 > .Ft "int"
 > .Fn enterpgrp "struct proc *p, pid_t pgid, int mksess"
 
 The parameters should be separated.  E.g.:
 
 .Fn enterpgrp "struct proc *p" "pid_t pgid" "int mksess"
 
 > .Ft "int"
 > .Fn leavepgrp "struct proc *p"
 > .Ft "static void"
 > .Fn pgdelete  "struct pgrp *pgrp"
 
 pgdelete is not meant to be used by anything outside of kern_proc
 (which is why it's "static"), so a man page for it is rather useless.
 Better improve the comments if you want to document it.
 
 > .Sh DESCRIPTION
 > .Fn enterpgrp 
 > takes three arguments: 
 > .Fa p
 > .Fa pgid
 > and
 > .Fa mksess.
 
 Please use punctuation (commas), and don't forget the space before
 them if they're in a macro.
 
 	.Fa p ,
 	.Fa pgid ,
 	and
 	.Fa mksess .
 
 
 > .Fa p
 > represents a pointer to a 
 > .Fa proc
 
 .Vt proc
 
 > structure which is going to enter the process group refrenced by
 > .Fa pgid.
 
 Space before period.
 
 > .Fa mksses
 > is an option, that when toggled, makes
 > .Fa p
 > the leader of a new session. 
 > .Pp
 > If 
 > .Fa pgrp
 > is
 > .Fa NULL
 
 .Dv NULL ,
 
 > the process specified by
 > .Fa p
 > becomes the leader of the process group.
 > .Pp
 > .Fn leavepgrp
 > only takes one argument, a pointer to a
 > .Fa proc
 > structure designated by
 > .Fa p.
 
 Space before period.
 
 > .Fa pgrp
 > removes the proc structure referenced by p from its proces group.
 
 ... referenced by
 .Fa p
 from its ...
 
 > .Pp
 > .Fn pgdelete
 > requires one argument, 
 > .Fa pgrp,
 
 Space before the comma.
 
 > which is a pointer to a pgrp structure. 
 
 ... a
 .Vt pgrp
 structure ...
 
 > .Fn pgdelete
 > deletes the process group
 > whose number is referenced by 
 > .Fa pgrp. 
 
 pgdelete is not an interface.
 
 > .Sh RETURN VALUES
 > .Fn enterpgrp
 > returns a 
 > .Fa ESRCH
 
 .Er ESRCH
 
 
 I've not verified the technical accuracy of this stuff, and there are
 also some more lines with whitespace at the end.  It's good work, but
 it could use improvement :-).
 
 Thanksk.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109031620.f83GK1G84487>