|
|
Subject: Re: Process Manager lies about process location - msg#00113
List: carbon-dev
At 6:00 AM -0700 7/27/09, carbon-dev-request@xxxxxxxxxxxxxxx wrote:
> From: "James W. Walker" <osx@xxxxxxxxxxxx>
> References: <FAB47107-5024-4CC7-A3BC-1627DC73FD9E@xxxxxxxxx>
> In-Reply-To: <FAB47107-5024-4CC7-A3BC-1627DC73FD9E@xxxxxxxxx>
> Date: Sun, 26 Jul 2009 22:22:12 -0700
> Message-ID: <6AD1198C-576B-4C47-AA0F-5F5351D23AD1@xxxxxxxxxxxx>
>
> Trying to find out whether a particular process corresponds to an app in the
> trash. Specifically, I have a system preference pane that contains a faceless
> background app. If the user has trashed an old version of the preference pane
> and opened a new one, I want to quit the background app for the old one, but
> not the background app for the new one.
I solved the same problem by having the background app monitor its own location
with a kqueue, and quitting itself immediately when it's moved. (In general, I
found that moving an app while it is running may cause all sorts of strange
behavior later on.)
HTH,
--
Rainer Brockerhoff <rainer@xxxxxxxxxxxxxxx>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (Carbon-dev@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/maillists%40codeha.us
This email sent to maillists@xxxxxxxxx
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Regarding Socket Programming in Mac
On Jul 27, 2009, at 11:58 AM, veeramani ganesan wrote:
I am new to the MAC environment. I needed to develop an appication
using socktes that should communicate with the TCP server.
My appication should be capable of sending and receving data from
the TCP server. So plz any one can suggest the basic methodlogy that
should be folowed for socket programming. also plz send me sample
app that using sockets for communications.
I guess that you should be able to use the CFNetwork framework that is
part of the Core Services framework. The CFNetwork Programming Guide
has some sample code that might be useful to check out.
Marcus
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (Carbon-dev@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/maillists%40codeha.us
This email sent to maillists@xxxxxxxxx
Next Message by Date:
click to view message preview
Regarding Soap Client for Mac
Hi,I need to send request and receive response from the soap server. My application should act as a soap client. so plz any one suggest me what are things i have to look to implement soap client. Also its very helpfull if any one send me a sample.
-- With Regards,Veeramani Ganesan,
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (Carbon-dev@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/maillists%40codeha.us
This email sent to maillists@xxxxxxxxx
Previous Message by Thread:
click to view message preview
Re: Process Manager lies about process location
On Jul 26, 2009, at 11:22 PM, Kiel Gillard wrote:
you're best using the FSRef you get from
GetProcessBundleLocation() to get a copy of it's path (perhaps by
using FSRefMakePath() or CFURLCreateFromFSRef()).
and that's what I tried, and it didn't work. I did mention using
GetProcessBundleLocation.
Surprising, as it works for me... I'm not sure how else I can help.
Getting and using the path of an FSRef should *always* be true and
accurate. Do you want to share some code?
I assumed that the FSRef returned by GetProcessBundleLocation is
itself wrong, I didn't even consider the possibility that I could be
getting the wrong path from the right FSRef. The Xcode debugger shows
where an FSRef points to, though I suppose that may be using the same
functions I use to get the path.
Anyway, I've already come up with a different approach: I just quit
every process with my bundle ID, and then launch the one I want. If
the result of this is that I end up launching exactly the same app
that I just quit, there's no real harm done. It's a small app that
launches fast, and since it's a background-only app, the user doesn't
see a bouncing dock icon.
If I get some time (maybe next weekend) I may try to construct a
simplified example and file a bug of my own.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (Carbon-dev@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/maillists%40codeha.us
This email sent to maillists@xxxxxxxxx
Next Message by Thread:
click to view message preview
Re: Process Manager lies about process location
On Jul 27, 2009, at 8:28 AM, Rainer Brockerhoff wrote:
At 6:00 AM -0700 7/27/09, carbon-dev-request@xxxxxxxxxxxxxxx wrote:
From: "James W. Walker" <osx@xxxxxxxxxxxx>
References: <FAB47107-5024-4CC7-A3BC-1627DC73FD9E@xxxxxxxxx>
In-Reply-To: <FAB47107-5024-4CC7-A3BC-1627DC73FD9E@xxxxxxxxx>
Date: Sun, 26 Jul 2009 22:22:12 -0700
Message-ID: <6AD1198C-576B-4C47-AA0F-5F5351D23AD1@xxxxxxxxxxxx>
Trying to find out whether a particular process corresponds to an
app in the trash. Specifically, I have a system preference pane
that contains a faceless background app. If the user has trashed
an old version of the preference pane and opened a new one, I want
to quit the background app for the old one, but not the background
app for the new one.
I solved the same problem by having the background app monitor its
own location with a kqueue, and quitting itself immediately when
it's moved. (In general, I found that moving an app while it is
running may cause all sorts of strange behavior later on.)
That's an interesting idea. But to really know if the app has been
moved, wouldn't your kqueue have to monitor not only the app, but its
parent folder, and that folder's parent, and on up the line?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (Carbon-dev@xxxxxxxxxxxxxxx)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/maillists%40codeha.us
This email sent to maillists@xxxxxxxxx
|
|