Changeset 2639


Ignore:
Timestamp:
5/22/2012 8:24:06 AM (2 years ago)
Author:
lowjoel
Message:

Handle a situation where we are unable to obtain the necessary performance information for entropy gathering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.DefaultPlugins/EntropySources/KernelEntropySource.cs

    r2622 r2639  
    105105            //Currently running threads (dynamic, but not very) 
    106106            Process currProcess = Process.GetCurrentProcess(); 
    107             foreach (ProcessThread thread in currProcess.Threads) 
    108                 result.AddRange(StructToBuffer(thread.Id)); 
     107            try 
     108            { 
     109                foreach (ProcessThread thread in currProcess.Threads) 
     110                    result.AddRange(StructToBuffer(thread.Id)); 
     111            } 
     112            catch (InvalidOperationException) 
     113            { 
     114                //Swallow, this doesn't mean anything to us. 
     115            } 
    109116 
    110117            //Various process statistics 
Note: See TracChangeset for help on using the changeset viewer.