Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quitting to another application
Message
From
05/03/2009 12:16:57
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
05/03/2009 07:34:00
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01385741
Message ID:
01385881
Views:
46
>>ShellExecute will start another program without affecting VFP in any way. You can also call ShellExecute in our shutdown routine, or right before Quit.
>
>And that were the problem lies: right before Quit means VFP is still executing.
>
>I'll semaphorize the processes to resolve conflicts.

I think the difference between "fox quitting" and "fox out" is almost academic; I don't recall there's any exitcode that comes into existence only when exit is completed. That being absent, and considering the time it takes the OS to launch a new process, I think the sequence would be the same as in a batch: fox would complete the quit before the new process would start.

I may be wrong, though - new process may be quite lightweight, cached or/and have a loader in the tray, and fox may be still doing garbage collection when the new process has already started. Specially if new process's thread is on a different core of the processor.

So unless you can schedule your new process to begin in a second or two, or if your process would specifically wait until some signature property of Fox executable has vanished from the system, semaphore would be the way to go.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform