• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unix Process ID (and Processes List)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix Process ID (and Processes List)


  • Subject: Re: Unix Process ID (and Processes List)
  • From: Aram Greenman <email@hidden>
  • Date: Tue, 4 Mar 2003 16:22:17 -0800

On Tuesday, March 4, 2003, at 02:21 PM, Daniele M. wrote:

Hi

I would to know the Unix ID number of a process. I have found the code
to get the processes list. Is there a method to get, from here, the
unix pid of the process?

Check out my AGProcess class at http://sourceforge.net/projects/agkit. For example, to loop through every running process and log its pid and command:

NSEnumerator *en = [[AGProcess allProcesses] objectEnumerator];
AGProcess *p;
while (p = [en nextObject])
NSLog(@"%d %@", [p processIdentifier], [p command]);

To find the pid of a specific process:

int pbx = [[AGProcess processForCommand:@"Project Builder"] processIdentifier];

Aram
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Unix Process ID (and Processes List) (From: "Daniele M." <email@hidden>)

  • Prev by Date: weird linking error while building framework
  • Next by Date: Audio CD's and IOKit
  • Previous by thread: Re: Unix Process ID (and Processes List)
  • Next by thread: Re: Main application loop question : what is inside [NSApp run] ?
  • Index(es):
    • Date
    • Thread