Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-04 Thread Michael Ash
On Mon, Aug 4, 2008 at 12:22 AM, Andrew Farmer <[EMAIL PROTECTED]> wrote: > On 03 Aug 08, at 19:53, Michael Ash wrote: >> >> On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer <[EMAIL PROTECTED]> wrote: >>> >>> On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app.

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-04 Thread Andrew Farmer
On 03 Aug 08, at 23:15, Steve Cronin wrote: OK for the sake of the group I will parade my ignorance so that perhaps others can learn too... First I do understand your point that using AppleScript is using an unnecessary high-level tool when a lower-level tool will do! Thanks for keeping me o

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Kyle Sluder
On Mon, Aug 4, 2008 at 2:15 AM, Steve Cronin <[EMAIL PROTECTED]> wrote: > I have 4 questions > 1) Given that it is higher-level than necessary, I would still appreciate > understanding why it doesn't work. Race conditions, waiting on the child task to complete, reliance on shell parsing semantics.

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Kyle Sluder
On Mon, Aug 4, 2008 at 12:22 AM, Andrew Farmer <[EMAIL PROTECTED]> wrote: > The double-fork is to fully detach the child process from the parent - note > that all of the parent processes immediately die, because fork() returns > nonzero. But you've still introduced a race condition. You can more

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Steve Cronin
Andrew; OK for the sake of the group I will parade my ignorance so that perhaps others can learn too... First I do understand your point that using AppleScript is using an unnecessary high-level tool when a lower-level tool will do! Thanks for keeping me on-point there!! Good old-school un

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 19:53, Michael Ash wrote: On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer <[EMAIL PROTECTED]> wrote: On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Michael Ash
On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer <[EMAIL PROTECTED]> wrote: > On 03 Aug 08, at 14:00, Steve Cronin wrote: >> >> I am trying to simply restart my app. To my dismay, I cannot find a way >> to do this in Cocoa. >> Please enlighten me if I have failed to understand something!! >> >> After

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the archives, what makes the most sense to me is to launch a detached shell

Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Steve Cronin
Folks; I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the archives, what makes the most sense to me is to launch a detached shell that executes a simple AppleScript.