From owner-freebsd-questions@FreeBSD.ORG Sun Sep 14 07:47:41 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 636DC1065676 for ; Sun, 14 Sep 2008 07:47:41 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from aegis.hamla.org (aegis.hamla.org [206.251.255.39]) by mx1.freebsd.org (Postfix) with ESMTP id 53CDE8FC1A for ; Sun, 14 Sep 2008 07:47:41 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from localhost (localhost [127.0.0.1]) by aegis.hamla.org (Postfix) with ESMTP id A8E705C6D; Sun, 14 Sep 2008 03:29:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tandon.net; h= in-reply-to:content-disposition:content-type:mime-version :references:reply-to:message-id:subject:from:date:received: x-virus-scanned; s=aegis; t=1221377390; bh=BLdlbiN9k1aebw+XynOtL Ay5kJm5Qz7xj1826VekkCI=; b=oQwQ1/owhKFT/f4ORGmopxlHDYSvIEMmR1N1/ I2oYs4y5giwnug1mCBFXj13086VbEjd+RKu0bhNHzKedPS6a2gNgRfsca52A4P58 cqsOfLw2IdysixkytR7YSruh5JJNVLxSJjt45WPOVjK3afT+duv65WRuqcnOCvey KLLUhI= X-Virus-Scanned: by ClamAV at aegis.hamla.org Received: from aegis.hamla.org ([127.0.0.1]) by localhost (aegis.hamla.org [127.0.0.1]) (amavisd-new, port 10027) with LMTP id htFJW5HOGpML; Sun, 14 Sep 2008 03:29:50 -0400 (EDT) Date: Sun, 14 Sep 2008 03:29:36 -0400 From: Sahil Tandon To: Richard Yang Message-ID: <20080914072936.GS234@shepherd> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: questions@freebsd.org Subject: Re: problem killing a process with its pid X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "sahil@tandon.net" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 07:47:41 -0000 Richard Yang wrote: > I have been trying to kill the process by pulling natd.pid Is the rc script, which can be used to stop natd, not working? > below are 3 typical examples among a couple dozens I tried > > kill -9 $(natd.pid) > Illegal variable name > > kill -9 '/var/run/natd.pid' > kill: Arguments should be jobs or process id's > > cat /var/run/natd.pid | kill -9 > (no error returned, but natd process is still up) In bash, you could: # kill -9 $(cat /var/run/natd.pid) -- Sahil Tandon