Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » I keep getting the same "cannot open exe for writing" error...
Re: I keep getting the same "cannot open exe for writing" error... [message #50655 is a reply to message #50651] Thu, 29 November 2018 13:41 Go to previous messageGo to previous message
peterh is currently offline  peterh
Messages: 46
Registered: November 2018
Location: Germany
Member
The question is, if your process needs more time than 3 seconds to terminate.
The other question is can it been terminated with this method at all?
If it hangs in blocking IO in kernel mode, possibly it cannot be terminated.
I do regulary see applications that do serial IO via the .NET and if these crash, then
Windows does not shut down because it waits for the process forever.

This is why I proposed tho give report to the user.

There could be a message box:

"Process termination timeout"
"Wait and retry?" "Ignore and try to Close anyway"

WaitForSingleObject should return these Values:

WAIT_OBJECT_0 means the thread has stopped.
WAIT_TIMEOUT means the thread is running.

Not that I have practical experience with this. This is what I found in MSDN.

Edit:
Just for explanation:
Even if the processhandle is closed and the process detached the file cannot been deleted or modified as long as the process is running.
This is, because windows needs the .exe file for virtual memory paging, when the process is still running.
In this case the file could be renamed and marked for deletion.

[Updated on: Thu, 29 November 2018 16:22]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: error: expected unqualified-id before '=' token
Next Topic: clang or MinGW
Goto Forum:
  


Current Time: Sun Jul 05 03:48:20 CEST 2020

Total time taken to generate the page: 0.01278 seconds