From owner-freebsd-questions Thu Jan 4 17:37:47 2001 From owner-freebsd-questions@FreeBSD.ORG Thu Jan 4 17:37:45 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 5B6ED37B400 for ; Thu, 4 Jan 2001 17:37:45 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f051akG68805; Thu, 4 Jan 2001 17:36:46 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 04 Jan 2001 17:37:46 -0800 (PST) From: John Baldwin To: Steven Subject: RE: Killing process Cc: FreeBSD Questions Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 05-Jan-01 Steven wrote: >> Use the back quotes. Command should be >> >> kill -9 `cat /var/run/inetd.pid` > > you can also just do: > > killall inetd > > or any other process running in place of inetd. killall should be used with caution IMO. killall does very different things on other UNIX and UNIX-like OS's (try using killall as root on Tru64 for a fun surprise), and it also can kill more than one instance of a daemon, while with a pid file in /var/run you are killing a specific one. For example, if you have multiple dhclient's running with a pidfile that includes the interface name in the filename, then kill `cat /var/run/dhclient.cue0.pid` can provide very different results from killall dhclient -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message