Message-ID: <38DA18AB.B18BC682@HOME.COM>
From: Kevin Lichterman <KLICHTERMAN@HOME.COM>
Organization: @Home Network
X-Mailer: Mozilla 4.7 [en]C-AtHome0407  (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.minix
Subject: Re: can i process find its process number?
References: <38D9997D.895EABFC@HOME.COM> <38d9ad96.0@news>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 24
Date: Thu, 23 Mar 2000 13:17:06 GMT
NNTP-Posting-Host: 24.14.100.203
X-Complaints-To: abuse@home.net
X-Trace: news1.rdc1.il.home.com 953817426 24.14.100.203 (Thu, 23 Mar 2000 05:17:06 PST)
NNTP-Posting-Date: Thu, 23 Mar 2000 05:17:06 PST
Path: news.adfa.oz.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!news.mel.connect.com.au!news.syd.connect.com.au!nsw.nnrp.telstra.net!intgwlon.nntp.telstra.net!newsfeed.mathworks.com!feeder.via.net!newshub1.home.com!news.home.com!news1.rdc1.il.home.com.POSTED!not-for-mail
Xref: news.adfa.oz.au comp.os.minix:34901

thanks for the quick reply - i'm kicking myself now for not finding it
kev

Al Woodhull wrote:
> 
> On Thu, 23 Mar 2000 04:14:29 GMT Kevin Lichterman
> <KLICHTERMAN@home.com> wrote in comp.os.minix:
> 
> : this may seem simple but can any running process determine what it's
> : process number is (p_nr) from the process table?  using it;s name does
> : not seem to be a solution since names may not be unique
> 
> You can write this ability into your own programs, using the getpid()
> call. If a program can create a child process, such a child can use
> the getppid() call to get its parent's pid.
> 
> --
> +----------------------------------+
> | Albert S. Woodhull               |
> | Hampshire College, Amherst, MA   |
> | awoodhull@hampshire.edu          |
> | http://minix1.hampshire.edu/asw/ |
> +----------------------------------+
> 94.3% of all statistics are made up on the spot
