• 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: pid vs. Process Serial Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pid vs. Process Serial Number


  • Subject: Re: pid vs. Process Serial Number
  • From: "Finlay Dobbie" <email@hidden>
  • Date: Thu, 21 Sep 2006 08:33:31 -0400

On 21/09/06, Brad Peterson <email@hidden> wrote:
Hi all,

I'm trying to determine if my app was launched by cron
so that I can automate certain actions which would
otherwise require interaction.

So, I figured I'd use getppid(), convert the result to
a psn, use that to get the process' name, and then
check for "cron".

But, I always get a -600 when calling
GetProcessForPID().

Not all processes have PSNs. cron probably won't have one.

-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >pid vs. Process Serial Number (From: Brad Peterson <email@hidden>)

  • Prev by Date: Re: pid vs. Process Serial Number
  • Next by Date: Re: pid vs. Process Serial Number
  • Previous by thread: Re: pid vs. Process Serial Number
  • Next by thread: Re: pid vs. Process Serial Number
  • Index(es):
    • Date
    • Thread