How can I access the environment of another process?
How can I access the environment of another process?
- Subject: How can I access the environment of another process?
- From: Michael Marti <email@hidden>
- Date: Tue, 11 Mar 2003 21:17:25 +0000
Dear List
Please excuse me if this is of topic, or if it is a very basic question, but
I don't know where to find the answer:
Can anyone tell me, how I can access the environment variables of a process
of which I have the kinfo_proc structure.
We are running a computation cluster with 20 Dual G4's. The job scheduling
system sometimes leaves some processes on the node after it kills a job.
Since more than one job can run on a machine, I cannot simply kill all user
processes on a machine after a job finishes or gets killed. The only way I I
can think of is to kill all the processes that have the job id set to the
proper value (i.e. The job that just finished) in the environment. For that
I need to loop trough all processes and look at there environment. I know
how to get an array with the kinfo_proc structures of all the running
processes, but how can I access there environment memory?
Thanks for your help
Michael.
--
----------------------------------------------------------------------------
Michael Marti
Centro de Fisica dos Plasmas
Instituto Superior Tecnico
Av. Rovisco Pais
1049-001 Lisboa
Portugal
Tel. +351 21 841 93 79
----------------------------------------------------------------------------
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.