Skip to content

Commit

Permalink
Wait for previous process to terminate
Browse files Browse the repository at this point in the history
The new process will not have read/write access to config files if it
does not wait until previous processes have been terminated.
  • Loading branch information
LegendOfDragoon committed Jul 10, 2017
1 parent e541998 commit cd17e98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Common/Util.cpp
Expand Up @@ -107,6 +107,7 @@ bool pjutil::TerminatedExistingExe()
if (TerminateProcess(hHandle, 0))
{
bTerminated = true;
WaitForSingleObject(hHandle, 30 * 1000);
}
else
{
Expand Down

1 comment on commit cd17e98

@AmbientMalice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work. This has been bugging me forever.

Please sign in to comment.