From owner-freebsd-questions Wed Sep 23 11:14:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA14454 for freebsd-questions-outgoing; Wed, 23 Sep 1998 11:14:54 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dt053nb4.san.rr.com (dt053nb4.san.rr.com [204.210.34.180]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA14440 for ; Wed, 23 Sep 1998 11:14:44 -0700 (PDT) (envelope-from Studded@dal.net) Received: from dal.net (Studded@localhost [127.0.0.1]) by dt053nb4.san.rr.com (8.8.8/8.8.8) with ESMTP id LAA06936; Wed, 23 Sep 1998 11:13:15 -0700 (PDT) (envelope-from Studded@dal.net) Message-ID: <36093A3B.7217F443@dal.net> Date: Wed, 23 Sep 1998 11:13:15 -0700 From: Studded Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.06 [en] (X11; I; FreeBSD 2.2.7-STABLE-0920 i386) MIME-Version: 1.0 To: Dan Nelson CC: Andre Albsmeier , freebsd-questions@FreeBSD.ORG Subject: Re: How to get the PID before a program is run? (No joke :-) References: <199809230729.JAA12131@internal> <19980923095428.B10645@emsphone.com> <360931B1.29E98E12@dal.net> <19980923125749.A26376@emsphone.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dan Nelson wrote: > You left out the rest of my script :) > > #! /bin/sh > echo $$ > /var/run/program.pid > exec /bin/program > > The exec replaces the shellscript with the program. The pid does not > change. You are correct. My understanding was that even with exec there would be a new pid for the new program. Nice to learn something new. :) Sorry for the confusion, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message