Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8486611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:59:36+00:00 2026-06-10T20:59:36+00:00

Given the PID of a process, how can I check if it’s a windowed

  • 0

Given the PID of a process, how can I check if it’s a windowed process? I am looking for a solution on OSX.

Objective-C/ C solutions are wanted.
I am on OSX Mountain Lion.

I am defining a windowed process as a process that can be seen when the “Windowed Processes” tab is selected in activity monitor. http://cl.ly/FeXR

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:59:38+00:00Added an answer on June 10, 2026 at 8:59 pm
    [NSWorkspace runningApplications] 
    

    This returns all the user applications in a NSArray as instances of NSRunningApplication which has a property processIdentifier.

    Or you can use runningApplicationWithProcessIdentifier: directly to get the application with a specified PID.

    Here is the sample code: http://developer.apple.com/library/Mac/#samplecode/AppList/Introduction/Intro.html

    Through the activationPolicy property of the NSRunningApplication you could get the Windowed state. I modified the AppList code to make it show only the windowed applications as shown below. This matches what the activity monitor shows.

    enter image description here

    In particular, you are looking for the NSApplicationActivationPolicyRegular.

    Note the restrictions however. This only works for user owned processes.

    All other methods are deprecated and may not work in future. Methods like GetBSDProcessList and Carbon’s GetProcessInformation are not recommended anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I get the PID of a TERMINAL running a process with given
Given the pid of a Linux process, I want to check, from a C
Given a pid, I want to find the owner of the process (as uid).
Is there a way to enumerate a process with a given PID in Windows,
We all know and love Process.WaitForExit(). Given a pid of a process on a
I have a simple query to show a given users photos: SELECT pid FROM
Given the following code: $(.force-selection).blur(function() { var value = $('matched-item').val(); //check if the input's
Given a process iD of XX, I'd like to have a list of any
What is the PID assignment policy in Windows? Repeated runs of a process calling
Problem Given a process ID & command-line access on a remote Windows host, how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.