Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable shellext: insert wait in terminate

If the pipe worked ok (=icon server was running), then we wait a bit to give
the overlay icon server a bit time to shut down.

This works around a race in the InstallValidate action of the installer, where
InstallValidate proceeds immediately to check if processes are still using
files (terminate is called in a custom action right before InstallValidate).

Previously, terminate didn't wait, which occasionally lead to InstallValidate
still listing the icon server in the user install UI as needed to shut down
(files in use).

Changeset ca30f8795605

Parent d78e44c21a04

by Adrian Buehlmann

Changes to one file · Browse files at ca30f8795605 Showing diff from parent d78e44c21a04 Diff from another changeset...

 
6
7
8
9
 
 
 
 
 
 
10
11
 
6
7
8
 
9
10
11
12
13
14
15
16
@@ -6,6 +6,11 @@
   int main(int argc, char *argv[])  { - Thgstatus::terminate(); + if (Thgstatus::terminate() == 0) + { + // pipe ok, so icon server is running + // -> wait a bit for icon server to shut down + ::Sleep(5000 /* ms */); + }   return 0;  }