Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/src/installer-lib/process.cpp

Issue 6219169376763904: Issue #1686 - Kill iexplore.exe and AdblockplusEngine.exe processes from the installer (Closed)
Patch Set: Created March 13, 2015, 12:37 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/src/installer-lib/process.cpp
===================================================================
--- a/installer/src/installer-lib/process.cpp
+++ b/installer/src/installer-lib/process.cpp
@@ -280,9 +280,20 @@
default :
Eric 2015/03/13 16:49:48 This should be "case 4 :" and we should retain the
/*
- * We're out of ways to try to shut down.
+ * We're out of ways to try to shut down. Oh well. Take cover. It gets violent here.
Eric 2015/03/13 16:49:48 Good comment.
*/
- return false ;
+ for (auto it = pid_set.begin(); it != pid_set.end(); ++it)
+ {
+ HANDLE tmpHandle = OpenProcess(PROCESS_TERMINATE, FALSE, *it);
+ if (tmpHandle != NULL)
Eric 2015/03/13 16:49:48 We can use implicit conversion to bool here. I wo
+ {
+ Windows_Handle procHandle(tmpHandle);
+ TerminateProcess(tmpHandle, 0);
+ }
+ }
+ Refresh();
+
+ return !IsRunning() ;
}
/*
@@ -290,7 +301,7 @@
*/
for ( unsigned int j = 0 ; j < 50 ; ++ j )
{
- std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ) ;
+ std::this_thread::sleep_for( std::chrono::milliseconds( 30 ) ) ;
sergei 2015/04/02 08:04:09 no spaces?
Refresh() ;
if ( ! IsRunning() )
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld