From owner-freebsd-questions Tue Sep 24 2:55: 2 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E20237B401 for ; Tue, 24 Sep 2002 02:55:00 -0700 (PDT) Received: from slate.dublin.wbtsystems.com (slate.dublin.wbtsystems.com [193.120.231.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8644843E4A for ; Tue, 24 Sep 2002 02:54:59 -0700 (PDT) (envelope-from barry.byrne@wbtsystems.com) Received: from spiral (spiral.dublin.wbtsystems.com [193.120.231.190]) (authenticated bits=0) by slate.dublin.wbtsystems.com (8.12.6/8.12.6) with ESMTP id g8O9suU2047168; Tue, 24 Sep 2002 10:54:56 +0100 (IST) From: "Barry Byrne" To: "Pascal Giannakakis" , Subject: RE: Writing a start / stop script (getting pid) Date: Tue, 24 Sep 2002 10:54:55 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <32468.1032860433@www23.gmx.net> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-WBT-Authenticated-User: bb X-Scanned-By: slate/MIMEDefang 2.21 (www . roaringpenguin . com / mimedefang) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Pascal: You can use the -p option of ftpd to write it's PID to a file. Something like ftpd -D -p /var/run/fptd.pid should probably work. - Barry -- Barry Byrne, IT Manager, WBT Systems, Block 2, Harcourt Centre Harcourt Street, Dublin 2, Ireland > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Pascal > Giannakakis > Sent: 24 September 2002 10:41 > To: freebsd-questions@FreeBSD.ORG > Subject: Writing a start / stop script (getting pid) > > > Lo ppl, > > how to i get the pid of a process i start in a shellscript? > > The Variables $$ / $PID are not really of use. What i would like > to have, is > some sort > of command with has the return value of another startet script. > > The background: i try to write a rc.d script for ftpd, and i need > the PID to > stop it > again. > > Thx! > > -- > Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen - > und tolle Preise absahnen! http://www.onlinestar.de > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message