Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find running applications under Mac OS
Message
De
31/08/2019 20:13:33
 
 
À
31/08/2019 15:43:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Go
Catégorie:
Code, syntax et commandes
Divers
Thread ID:
01670494
Message ID:
01670498
Vues:
50
This message has been marked as a message which has helped to the initial question of the thread.
J'aime (1)
>I can get all the processes running in a Mac. But I want to get only those that are applications - those who are listed in activity monitor as "Windowed Processes" or those you see in "Force Quit" list (Command+Option+Esc).
>
>PS: I prefer Go but language is not that much important.

I've never used Mac OS X, but from what I understand:

Mac OS X 10.5+ is UNIX-compliant (except 10.7) and POSIX-compliant so you can use standard UNIX and POSIX functions to access live OS information. The UNIX command ps aux is one example. You can examine the various codes / flags output for each process. One of them indicates if it's a background or foreground process. Other UNIX commands provide similar information.

https://superuser.com/questions/117913/ps-aux-output-meaning
https://web.archive.org/web/20150702131123/http://unixhelp.ed.ac.uk/CGI/man-cgi?ps

Mac OS X certifications for UNIX, POSIX:
10.5 -- https://www.opengroup.org/openbrand/register/brand3555.htm
10.6 -- http://www.opengroup.org/openbrand/register/brand3581.htm
10.7 -- Not compliant.
10.8 -- http://www.opengroup.org/openbrand/register/brand3591.htm
10.9 -- http://www.opengroup.org/openbrand/register/brand3602.htm
10.10 -- http://www.opengroup.org/openbrand/register/brand3607.htm
10.11 -- http://www.opengroup.org/openbrand/register/brand3612.htm
10.12 -- http://www.opengroup.org/openbrand/register/brand3627.htm
10.13 -- https://www.opengroup.org/openbrand/register/brand3632.htm
10.14 -- https://www.opengroup.org/openbrand/register/brand3648.htm

POSIX -- 10.5+ -- https://en.wikipedia.org/wiki/POSIX#POSIX-certified
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform