control after unexpected shutdown
<p>I'm working on a program that sends a command to the server and creates a file on the server to let it know its connected for example,  while the program is running it creates a file say "here" everytime it loops,  a php site then checks the server for that file, if the file is there it knows the program is connected.  However when it suddently stops say because the computer is shutdown, it might happen to shutdown when the file has been created, so say it shutsdown now in 5minutes if the server checks the file will be there, is there any way to have the program delete the file on unexpected shutdown?  This is on C++.</p>

<p>thank,</p>
