🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #142

Extracting cmdline and env of other processes

#142
From: Carsten Lutz
Date: Wed, 04 Nov 1992 12:53
19 lines
1100 bytes
Moin !

I'm looking for a way to get the commandlines and environments ( at start-
time ) of other processes. Has anyone done this before or knows what the
best way to do this is ? 'ps' has to do this in some way 'cause it's able
to display both cmdline and environment.

One way I could imagine is to find the stacks of other processes via /dev/kmem.
Undermost on this stacks there must be the commandlines and the environments
( both arguments to main() ) somewhere around. Is there a better way ? 
mach-hackers wanted !

greetings,
		Carsten


-- 
* Carsten Lutz, Rellingen, FRG / clu@malihh.hanse.de ( NeXTmail accepted )  *
*   Voice : +49 4101 512493  Fax: +49 4101 27757  Traily : +49 4101 22306   *
Technical Details
Message-ID: <Bx6zu0.DAC@malihh.hanse.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ira.uka.de!Germany.EU.net!news.Hamburg.Germany.EU.net!malihh!clu

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ira.uka.de!Germany.EU.net!news.Hamburg.Germany.EU.net!malihh!clu
From: clu@malihh.hanse.de (Carsten Lutz)
Subject: Extracting cmdline and env of other processes
Message-ID: <Bx6zu0.DAC@malihh.hanse.de>
Organization: malihh, Hamburg, Germany
Date: Wed, 4 Nov 1992 12:53:56 GMT
Lines: 19