From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1347 Path: news.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: graceful restart under runit Date: Fri, 24 Nov 2006 16:22:11 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: <20061117133435.GB2153@home.power> <20061118002245.GB17975@home.power> <20061118123120.GA8388@home.power> <20061120182733.GA629@fly.srk.fer.hr> <20061122192506.GA24958@fly.srk.fer.hr> <20061123122557.GA17067@fly.srk.fer.hr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1164403348 460 80.91.229.2 (24 Nov 2006 21:22:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Nov 2006 21:22:28 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-1583-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Nov 24 22:22:26 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1GniV3-0006K3-Bf for gcsg-supervision@gmane.org; Fri, 24 Nov 2006 22:22:21 +0100 Original-Received: (qmail 31145 invoked by uid 76); 24 Nov 2006 21:22:39 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 31137 invoked from network); 24 Nov 2006 21:22:39 -0000 Original-To: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= In-Reply-To: <20061123122557.GA17067@fly.srk.fer.hr> (=?iso-8859-2?Q?Dra?= =?iso-8859-2?Q?=BEen_Ka=E8ar's?= message of "Thu, 23 Nov 2006 13:25:57 +0100") Mail-Copies-To: nobody Mail-Followup-To: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= , supervision@list.skarnet.org Original-Lines: 25 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1347 Archived-At: Dra=BEen Ka=E8ar wrote: > PIDs are not recycled fast in practice, so that would have to be > good enough. They certainly are recycled fast in practice, although maybe not often. For example, OpenBSD can assign PIDs in random order instead of sequentially, so a PID has a chance of being reused for the very next process after it exits. The same problem can hit any OS if it spawns short-lived processes at a high rate. For me, at least, it's well worth using poll()/select() to avoid this risk. It's a one-time task for the programmer, but PID recycling is a constant danger for every user. > Somewhat unportable guarantee could be obtained via /proc. You know the > PID, so you stop the process via /proc or ptrace() or whatever is > available for debuggers (something will be available), check that the PID > is associated with the correct executable via /proc, Even if it's the right program, that doesn't guarantee it's the right process. This seems like more work than poll()/select(), with worse results. paul