• 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: Processes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Processes


  • Subject: Re: Processes
  • From: Finlay Dobbie <email@hidden>
  • Date: Mon, 21 Jan 2002 20:15:13 +0000

On Monday, January 21, 2002, at 08:17 PM, Douglas Davidson wrote:

On Monday, January 21, 2002, at 11:17 AM, Finlay Dobbie wrote:

2. How can I send that application a quit message once I have discovered if it is running?

A little more difficult. There is an API for this in CoreProcesses, which is private. You could probably use GetPID() on the PSN and then call kill() (man 2 kill) with SIGQUIT or SIGKILL.

It would probably be politer to send a quit Apple Event, if the thing you are trying to cause to exit is an application. The signals should probably be reserved for non-application processes, and to force-quit applications that are not responding.

Why isn't the nicer CPS API public, though? :-)

-- Finlay


References: 
 >Re: Processes (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Processes
  • Next by Date: Re: NSSplitView size, how to change ?!
  • Previous by thread: Re: Processes
  • Next by thread: copy & paste between Carbon and Cocoa
  • Index(es):
    • Date
    • Thread