Application suddenly returns

Started by
2 comments, last by pulpfist 18 years, 1 month ago
My application makes some easy operations: 1) Creates temporary folder. 2) Starts another application (using pipes) that writes some file. 3) Then my application gets the size of that written file. If it doesn't, the message box appears. 4) Deletes temporary folder. Sometimes the 3) shows message box (because the file is not closed yet) but it's ok. But the problem is when the 3) and 4)are not executed and application returns. This problem appears only on Win 2003 Server (on XP everything is ok). What's the problem?
VATCHENKO.COM
Advertisement
Does it happen every time on the Win 2003 server or just now and then?
You should post the code on this one...
It crashes sometimes, not every time. The code is hard to understand because many modules interact. I can show the code without interaction:
CreateTemplateDir("code");
RunCompiler();
WriteJad();
FullRemoveDir("code");

I think there's something wrong with commonly used dirs (one dir cannot be deleted when other application looks through it).
VATCHENKO.COM
Its hard to tell without more info but it sounds like your parent need to wait for the child to finish using the WaitFor*() and GetExitCodeProcess() functions to make sure it exited successfully before continuing.

This topic is closed to new replies.

Advertisement