Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close a 2nd VFP exe
Message
From
20/07/2007 14:59:02
 
 
To
20/07/2007 12:10:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01242070
Message ID:
01242465
Views:
15
>Program1 doesn't care about the semaphore, except to create it and delete it when closing.
>
>Program2 cares about the semaphore, but doesn't create it or delete it. And program2 (I assume) can be closed even if there is a semaphore. And the presence of a semaphore doesn't prevent program2 from starting (it expects it to be there).
>
>I'm probably missing a scenario. Why does the semaphore need to be manually deleted?

From original Post;
We want the 2nd EXE to close whenever the primary exe is closed. Does anyone have any code we can reuse to accomplish this?
Assumption:
2nd Exe is running, [you try to close #1 and run into an error / #1 closes because of C0000005]
because of error the code deleting the semaphore file is not run
result process #1 is gone, leaving the semaphore file merrily taking up disk space.
#2 duly checks the semaphore and starts to emulate the VW beetle:
it runs and runs and runs [until you manually close or delete the semaphore]

HTH

thomas


>>
>>Sure that is preferred, but havig a way to clobber a runaway/hanging child process is nicer than to instruct via hotline to delete a semaphore file - which might not even help in a hanging process.
>>
>>regards
>>
>>thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform