From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from math.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with SMTP id WAA04635 for ; Thu, 16 Nov 1995 22:51:22 +1100 (EST) Received: by math.gatech.edu (5.x/SMI-SVR4) id AA29423; Thu, 16 Nov 1995 06:26:11 -0500 Old-Return-Path: Resent-Date: Thu, 16 Nov 1995 12:19:06 +0100 Old-Return-Path: Date: Thu, 16 Nov 1995 12:19:06 +0100 Message-Id: <199511161119.MAA06026@nu.EMBL-Heidelberg.DE> From: Rob Hooft To: zsh-users@math.gatech.edu Subject: kill semantics. X-Url: http://www.sander.embl-heidelberg.de/rob/ Resent-Message-Id: <"2nXGQ.0.HB7.Pungm"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/133 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hi, I've been playing around with kill(2) lately. Specifically, I'd like to use a resource lock-file from a script. The lock-file contains the PID of the process locking the resource. To verify whether the lock-file is stale, the script should test whether the PID still exists. Kill(2) has a neat feature for this: kill(2) NAME kill - Sends a signal to a process or to a group of processes [...] signal Specifies the signal. If the signal parameter is a value of 0 (the null signal), error checking is performed but no signal is sent. This can be used to check the validity of the process parameter. This seems to work from ZSH as well: "kill -0 PID" does the check fine. But it is not documented. Which makes me think: is this system specific? Regards, -- Rob W. W. Hooft ====== You have a computational protein problem? Try WHAT IF! = Rob.Hooft@EMBL-Heidelberg.DE, Meyerhofstr. 1, 69117 Heidelberg, Germany. == 3.0GS$ d-(?) s: a28 C++ UAIOS++(-) UL++++ P++ L++(+++) E++ W++(-) N++(+++) K? w-- O? M-(--) V(-) PS PE+ Y+ PGP t 5? X+ R tv+ b+ DI? D+ G+ e++++ h(*) !r !y+