Re: Launching an app from Carbon app (newbie question)
Re: Launching an app from Carbon app (newbie question)
- Subject: Re: Launching an app from Carbon app (newbie question)
- From: Glen Simmons <email@hidden>
- Date: Sun, 16 Oct 2005 19:45:40 -0500
On Oct 16, 2005, at 7:00 PM, apple wrote:
I am in the process of porting an application from windows to
Carbon. I have most of it working, but the original app would
connect to a server, check to see if an update was available, if
so, it would update itself. It updated itself by copying the
application to a temporary directory, running the temporary copy,
quitting the original one, then download the new app, save it in
place of the original, call the updated app in a new process, and
quit itself. When it is doing these executions of itself, it
passes information between the various instances of itself by
command line parameter. The original app used the windows
CreateProcess execute the various instances of itself. I am trying
to duplicate this behavior now (the application has to exist on
both platforms, so I am basically trying to create a copy of the
windows CreateProcess call). I coded it originally using the system
( ) call, passing in the command line I needed followed by the & to
make system return right!
away. If I verify each of these steps individually through the
debugger's command line parameters, it seems to work, and if I run
the application, it seems to update itself succesfully, but then
quits in the middle of doing something. My guess is that the when
the original process terminates, all the subsequent calls starting
different process using system are killed, and so I can't complete
the update. I tried using execve, but I always get a ENOTSUP
returned from that, and can't figure out why. I looked into using
Carbon's LaunchApplication call, but I don't see any way I can pass
in command line parameters. Does anyone here have any suggestions
as to what I could do to get this working?
My first suggestion would be to post to Carbon Dev instead of Cocoa
Dev. Much more likely to get an answer.
Glen
_______________________________________________
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