• 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: top broken on PPC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: top broken on PPC?


  • Subject: Re: top broken on PPC?
  • From: John Stiles <email@hidden>
  • Date: Sun, 22 Apr 2007 22:06:27 -0700

Have you looked into the Carbon Process Manager? This is a much more well-suited tool for the task you're describing.


Donald Hall wrote:
I have been using NSTask and the top command in a program to determine whether or not another particular program is running in the same account. This is working fine on my Intel iMac (10.4.8), but not on my two iBooks (10.4.8 and 10.4.9). On the iBooks my top command can still see processes active in a different account despite my use of the -U switch. Just to make sure it is not a problem with my program, I have also confirmed the same thing happens at the command line.

Here is what happens in Terminal:

Call the process I am monitoring "theProg". I start theProg in account user1, then switch to account user2. I type the following command into Terminal:

top -U user2

On my Intel iMac theProg does not appear in the table of processes, as is expected.

However, on my iBooks, theProg (and all of user1's other processes) appear in the table as if the U switch were not there.

Has anyone else seen this? Is this a bug?

Further testing shows that 'ps' works - i.e. it only sees processes in the account it's running in. As I said, top works fine on the iMac, but it looks like I will have to switch to ps to keep PPC compatibility.

Thanks for any information,

Don

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: top broken on PPC?
      • From: Uli Kusterer <email@hidden>
References: 
 >top broken on PPC? (From: Donald Hall <email@hidden>)

  • Prev by Date: Request for Authors: Focused Cocoa Topic Books
  • Next by Date: Handling malformed xml and preserving newlines while creating NSXmlDocument
  • Previous by thread: top broken on PPC?
  • Next by thread: Re: top broken on PPC?
  • Index(es):
    • Date
    • Thread