From owner-svn-doc-all@FreeBSD.ORG Mon Nov 5 16:17:44 2012 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 441E0B2D; Mon, 5 Nov 2012 16:17:44 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by mx1.freebsd.org (Postfix) with ESMTP id 9682E8FC0C; Mon, 5 Nov 2012 16:17:43 +0000 (UTC) X-AuditID: 1209190e-b7f756d000000904-a1-5097e57402e3 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id D1.0F.02308.475E7905; Mon, 5 Nov 2012 11:12:36 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qA5GCaeG013573; Mon, 5 Nov 2012 11:12:36 -0500 Received: from multics.mit.edu (SYSTEM-LOW-SIPB.MIT.EDU [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA5GCWgR016051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 5 Nov 2012 11:12:34 -0500 (EST) Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id qA5GCW08016924; Mon, 5 Nov 2012 11:12:32 -0500 (EST) Date: Mon, 5 Nov 2012 11:12:32 -0500 (EST) From: Benjamin Kaduk To: Eitan Adler Subject: Re: svn commit: r39947 - head/en_US.ISO8859-1/books/handbook/basics In-Reply-To: <201211051316.qA5DGjKG007261@svn.freebsd.org> Message-ID: References: <201211051316.qA5DGjKG007261@svn.freebsd.org> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsUixG6nrlvydHqAwc7vIhY/Ph5istj1dw6z xY1F+5ksdvf3MjuweMz4NJ8lgDGKyyYlNSezLLVI3y6BK+PFmT9MBS8EKiZuP83UwLiJt4uR k0NCwETi4KwprBC2mMSFe+vZuhi5OIQE9jFK/NuwnBHCWc8ocWztUWaQKiGB40wSJ9cXQ9j1 Euu/bGACsVkEtCR+bfwNZrMJqEjMfLORDcQWAbK/7/8JFmcWiJLYs7QRbJuwgJ/Eixe3GUFs TgEricubnwLZHBy8Ag4Sc3fngJhCApYSR3bIgVSICuhIrN4/hQXE5hUQlDg58wkLxERLiX9r f7FOYBSchSQ1C0lqASPTKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1jvdzMEr3UlNJNjKBw5ZTk 28H49aDSIUYBDkYlHt4PEtMDhFgTy4orcw8xSnIwKYnyFj0GCvEl5adUZiQWZ8QXleakFh9i lOBgVhLh5bgDlONNSaysSi3Kh0lJc7AoifNeSbnpLySQnliSmp2aWpBaBJOV4eBQkuCd8wSo UbAoNT21Ii0zpwQhzcTBCTKcB2h4H0gNb3FBYm5xZjpE/hSjopQ4bxNIQgAkkVGaB9cLSyev GMWBXhHmXQBSxQNMRXDdr4AGMwEN3n5pCsjgkkSElFQDo/TtnrMLO7t9rmnz3FV3/yJxxszT fWH8df4oKZ4bXk4+KsLpIasfyN8NcGzJUv9p23cu+OHsicZ7zuxt/r/87wqlq9XLuPetPeh9 fbFc2uK7ZWxhi1YenHxs71n97MStE3w5LhxrePStQatyLd/2eZlXTuvO4JTQcXz10ERrydzt n9aHazbJ7VBiKc5INNRiLipOBACJDzOSAgMAAA== Cc: svn-doc-head@freebsd.org, svn-doc-all@freebsd.org, doc-committers@freebsd.org X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2012 16:17:44 -0000 On Mon, 5 Nov 2012, Eitan Adler wrote: > Author: eadler > Date: Mon Nov 5 13:16:45 2012 > New Revision: 39947 > URL: http://svnweb.freebsd.org/changeset/doc/39947 > > Log: > Prefer the use of pgrep instead of ps | grep for exactly the reason > specified in the handbook: ps is "racy". > > Approved by: jkois > > Modified: > head/en_US.ISO8859-1/books/handbook/basics/chapter.xml > > Modified: head/en_US.ISO8859-1/books/handbook/basics/chapter.xml > ============================================================================== > --- head/en_US.ISO8859-1/books/handbook/basics/chapter.xml Mon Nov 5 11:32:14 2012 (r39946) > +++ head/en_US.ISO8859-1/books/handbook/basics/chapter.xml Mon Nov 5 13:16:45 2012 (r39947) > @@ -2185,20 +2185,12 @@ Swap: 256M Total, 38M Used, 217M Free, 1 > > > Find the process ID of the process you want to send the > - signal to. Do this using &man.ps.1; and &man.grep.1;. The > - &man.grep.1; command is used to search through output, > - looking for the string you specify. This command is run as grep is also a basic Unix command, appropriate to document in a "UNIX Basics" chapter. grep is used in the permissions section, but not documented there. Arguably this text should be moved to the first appearance of 'grep' in this chapter, not removed. -Ben > - a normal user, and &man.inetd.8; is run as > - root, so the > - options must be given to &man.ps.1;. > - > - &prompt.user; ps -ax | grep inetd > - 198 ?? IWs 0:00.00 inetd -wW > - > - So the &man.inetd.8; PID is 198. In some cases the > - grep inetd command might also appear in > - this output. This is because of the way &man.ps.1; has to > - find the list of running processes. > + signal to. Do this using &man.pgrep.1;. > + > + &prompt.user; pgrep -l inetd > +198 inetd -wW > + > + So the &man.inetd.8; PID is 198. > > > >