Date: Wed, 23 Sep 1998 16:00:18 +0200 (CEST) From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> To: hamilton@pobox.com (Jon Hamilton) Cc: andre.albsmeier@mchp.siemens.de, freebsd-questions@FreeBSD.ORG Subject: Re: How to get the PID before a program is run? (No joke :-) Message-ID: <199809231400.QAA00941@internal> In-Reply-To: <199809231352.PAA05460@david.siemens.de> from Jon Hamilton at "Sep 23, 98 08:55:55 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> > In message <199809230729.JAA12131@internal>, Andre Albsmeier wrote: > } Hi, > } > } I have a rather curious problem here: > } > } I want to start a program but I need its PID before > } it is run. One way would be to load the program and > } send a -STOP signal very quickly. Then I have got the > } PID, can do some things and send a -CONT signal when > } finished. > > It's actually fairly simple, though somewhat off the beaten path. Something > like: > > #!/bin/sh > echo "PID is $$" > exec /your/program/here OK, this replaces my shell script. But I have to do some stuff later when /your/program/here is finished. -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809231400.QAA00941>