From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,33f90678fd18cbc7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.38.134 with SMTP id g6mr23283324pbk.6.1318813702251; Sun, 16 Oct 2011 18:08:22 -0700 (PDT) Path: d5ni19046pbc.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: What is the best way to get a process-list with Ada? Date: Sun, 16 Oct 2011 21:08:19 -0400 Organization: The Wasteland Message-ID: References: <2cb6641e-dcd7-40de-95bd-71d405571631@p1g2000yqk.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:13986 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: 2011-10-16T21:08:19-04:00 List-Id: In article <2cb6641e-dcd7-40de-95bd-71d405571631@p1g2000yqk.googlegroups.com>, Shark8 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. 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