From owner-freebsd-stable Sun Jun 23 6:38:14 2002 Delivered-To: freebsd-stable@freebsd.org Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 2DC1137B409 for ; Sun, 23 Jun 2002 06:37:38 -0700 (PDT) Received: (from olli@localhost) by lurza.secnetix.de (8.11.6/8.11.6) id g5NDbYU48527; Sun, 23 Jun 2002 15:37:34 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) From: Oliver Fromme Message-Id: <200206231337.g5NDbYU48527@lurza.secnetix.de> Subject: Re: bug in pw, -STABLE [patch] To: geoff@sea-incorporated.com (Geoffrey C. Speicher) Date: Sun, 23 Jun 2002 15:37:34 +0200 (CEST) Cc: freebsd-stable@FreeBSD.ORG, olli@secnetix.de (Oliver Fromme), fullermd@over-yonder.net (Matthew D. Fuller), pherman@frenchfries.net (Paul Herman), freebsd@blockads.com (Matt Simerson) In-Reply-To: <20020623090830.W29729-100000@sea-incorporated.com> from "Geoffrey C. Speicher" at Jun 23, 2002 09:22:31 AM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Geoffrey C. Speicher wrote: > The beauty of encapsulating the pid file operations into a library is that > the implementation can be changed to create a socket instead of, or (more > likely) in addition to, a pid file. In fact, this may be just the thing > we need to close that "pid gets reused" hole. > > Since Matt already has the functions mostly implemented, I'll defer to > him. Another idea that came to my mind: Why not use the whole 32bit (signed) range for PID numbers? That would reduce the risk of PID number collisions by several orders of magnitude. Even if 10 new processes are spawned every second, the wrap-around will only happen after 7 years. (And I don't think I've ever seen a machine with 7 years uptime that has been spawning 10 new processes per second continuously during all that time.) Okay, we'd have to re-design the widths of the columns in /usr/bin/top, but that's certainly not that much of a problem. :-) Just a thought. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message