@mritter0
I haven't tried it but it could do something like this:
Old Amistore checks that a certain environmental variable isn't set.
Old Amistore sets the variable containing it's version.
Old Amistore downloads the new version and starts it.
New Amistore finds the variable and determines an old version is running.
New Amistore waits for the variable to be removed within a specified time.
Old Amistore cleans up, executes Forbid(), removes the variable and exits.
New AmiStore detects that the variable is gone and sets it's own variable.
New AmiStore completes it's startup and opens.
Normally you would just watch for a public MsgPort of the program, send a SIGBREAKF_CTRL_C signal to its mp_SigTask and wait until the port disappears. Then you can run the new version.
If the port is an ARexx port you can use an ARexx command to quit the program instead of Ctrl-C.
Or whatever makes the program quit. It's your program, you should know.
Make your program create a script and save it to T: that waits a couple of seconds and re-run program. Such script should be run async from your program before quitting.
I suppose you could add a new process and make it reachable with a message port. This would then wait for a signal or message. You then begin the process of closing down your program. When done you signal the process this is complete. Which then reopens your program and exits itself. Now, for this to work, you would need isolate and copy code for the new process so not too easy.
Perhaps easiest is to do similar but get code to spawn a new copy of your program, possibly with a WB API to relaunch it. Then exit the sub process and main process.
Also possible would be to simply close down your program to the last line of code. Then use DOS API to restart it. Exit.
My guess would be: With an helper programm it spawns before exiting.
@mritter0
I haven't tried it but it could do something like this:
Old Amistore checks that a certain environmental variable isn't set.
Old Amistore sets the variable containing it's version.
Old Amistore downloads the new version and starts it.
New Amistore finds the variable and determines an old version is running.
New Amistore waits for the variable to be removed within a specified time.
Old Amistore cleans up, executes Forbid(), removes the variable and exits.
New AmiStore detects that the variable is gone and sets it's own variable.
New AmiStore completes it's startup and opens.
X1000 - OS 4.1FE
Normally you would just watch for a public MsgPort of the program, send a SIGBREAKF_CTRL_C signal to its mp_SigTask and wait until the port disappears. Then you can run the new version.
If the port is an ARexx port you can use an ARexx command to quit the program instead of Ctrl-C.
Or whatever makes the program quit. It's your program, you should know.
Just start the new one with SystemTags() and then quit yourself.
Make your program create a script and save it to T: that waits a couple of seconds and re-run program. Such script should be run async from your program before quitting.
'T:myown.script'
C:Wait 2 SECS
path_to_my_program/program_executable
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
I suppose you could add a new process and make it reachable with a message port. This would then wait for a signal or message. You then begin the process of closing down your program. When done you signal the process this is complete. Which then reopens your program and exits itself. Now, for this to work, you would need isolate and copy code for the new process so not too easy.
Perhaps easiest is to do similar but get code to spawn a new copy of your program, possibly with a WB API to relaunch it. Then exit the sub process and main process.
Also possible would be to simply close down your program to the last line of code. Then use DOS API to restart it. Exit.
Thanks for the ideas, guys.