[NTLK] NewtonScript question: How to restart the Application from within the application

David Arnold davida at pobox.com
Sat Mar 12 18:31:53 PST 2022


> On 13 Mar 2022, at 11:19, NewtonTalk <newtontalk at pda-soft.de> wrote:
> 
> Hi gang,

<…>

> Any ideas?

Perhaps, this is not dissimilar to the problem of applications updating themselves (on desktop platforms)?  The usual approach there is to have a second, small application which does the restart.  Things like Sparkle, and Google Chrome’s update framework, among others, take this approach.

So …

MainApp spawns HelperApp.
MainApp exits.
HelperApp checks if MainApp is running.  If it is, it tries to kill it, and loops until it’s dead.
HelperApp starts MainApp.
HelperApp exits.
MainApp checks if HelperApp is running.  If it is, it tries to kill it, and loops until it’s dead.
MainApp does it’s usual startup, and etc.

Perhaps something like this would be possible?




d



More information about the NewtonTalk mailing list