Re: Processes
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>) |