From owner-freebsd-current@FreeBSD.ORG Sat Aug 30 12:05:50 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF65E16A4BF; Sat, 30 Aug 2003 12:05:50 -0700 (PDT) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB5A743FB1; Sat, 30 Aug 2003 12:05:49 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost.nic.fr [IPv6:::1] (may be forged)) by khavrinen.lcs.mit.edu (8.12.9/8.12.9) with ESMTP id h7UJ5mXV042981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.lcs.mit.edu issuer=SSL+20Client+20CA); Sat, 30 Aug 2003 15:05:49 -0400 (EDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.9/8.12.9/Submit) id h7UJ5msL042978; Sat, 30 Aug 2003 15:05:48 -0400 (EDT) (envelope-from wollman) Date: Sat, 30 Aug 2003 15:05:48 -0400 (EDT) From: Garrett Wollman Message-Id: <200308301905.h7UJ5msL042978@khavrinen.lcs.mit.edu> To: Robert Watson In-Reply-To: References: <20030830160618.GA52499@stack.nl> X-Spam-Score: -19.8 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) cc: freebsd-current@freebsd.org Subject: Re: Someone help me understand this...? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 19:05:50 -0000 < said: > The only way to close this sort of race is to have a notion of a > unique process identifier that lasts beyond the lifetime of the > process itself -- i.e., the ability to return EMYSINCERESTREGRESTS > if you try to signal a process after it has died, and have a > guarantee that the handle won't be reused. This is traditionally done by holding an advisory lock on the pid file; if the file is no longer locked, then the process holding the lock must have exited. You could also do it with UUIDs and a more heavyweight signal API. -GAWollman