From owner-svn-doc-head@FreeBSD.ORG Mon Nov 5 13:16:45 2012 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE3FF419; Mon, 5 Nov 2012 13:16:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78B838FC0C; Mon, 5 Nov 2012 13:16:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qA5DGjPw007263; Mon, 5 Nov 2012 13:16:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qA5DGjKG007261; Mon, 5 Nov 2012 13:16:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211051316.qA5DGjKG007261@svn.freebsd.org> From: Eitan Adler Date: Mon, 5 Nov 2012 13:16:45 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r39947 - head/en_US.ISO8859-1/books/handbook/basics X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2012 13:16:45 -0000 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 - 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.