Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
How to access environment from kinfo_proc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to access environment from kinfo_proc?



Dear List

Please excuse me if this is of topic, but I don't know where else to ask:

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
know 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
----------------------------------------------------------------------------
_______________________________________________
unix-porting mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/unix-porting
Do not post admin requests to the list. They will be ignored.





Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.