From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: What is the best way to get a process-list with Ada?
Date: Sun, 16 Oct 2011 21:08:19 -0400
Date: 2011-10-16T21:08:19-04:00 [thread overview]
Message-ID: <nospam-4F729D.21081916102011@news.aioe.org> (raw)
In-Reply-To: 2cb6641e-dcd7-40de-95bd-71d405571631@p1g2000yqk.googlegroups.com
In article
<2cb6641e-dcd7-40de-95bd-71d405571631@p1g2000yqk.googlegroups.com>,
Shark8 <onewingedshark@gmail.com> wrote:
> I got into a bit of a debate with a friend who said something to the
> effect that to write drivers one needed to use C/C++... anyway, he
> was irritated about not being able to use Java (which he's sort of
> been forced to use in this instance) to 1) get a process list, and 2)
> get window dimensions of a focused-window.
>
> I was wondering how those of you who have had experience in all three
> systems would approach it.
>
> (BTW; Linux, Mac, and Windows for #1 & #2, which is the reason they
> had for making the project Java, I certainly don't have enough
> experience w/ Mac and Linux to say much about them.)
In Java, ProcessBuilder would let one examine the output of `ps`.
The options vary among BSD/Darwin/Mac and GNU/Linux flavors.
I'm not aware of a cross-platform solution.
<http://www.google.com/search?q=man+ps>
In Ada, I've always assumed I could use GNAT.Os_Lib to Spawn a
similar task, but I've never actually had to do so.
Sorry, no idea about windows I didn't create.
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
next prev parent reply other threads:[~2011-10-17 1:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-16 21:10 What is the best way to get a process-list with Ada? Shark8
2011-10-16 23:21 ` anon
2011-10-17 9:33 ` Oliver Kleinke
2011-10-19 0:49 ` Shark8
2011-10-19 0:47 ` Shark8
2011-10-17 1:08 ` John B. Matthews [this message]
2011-10-18 11:21 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox