1 |
|
//#define DISABLE_VERBOSE_LOGGING_FOR_PERFORMANCE_BOOST // when defined will disable verbose logging for performance speed-up |
2 |
|
//#define DISALLOW_VERBOSE_LOGGING // when defined will disallow verbose logging for performance reasons |
3 |
+ |
#define ALLOW_SYSTEM_PROCESSES_TO_BE_INLUCDED // when defined system processes will be included in process list |
4 |
|
using System; |
5 |
|
using System.Collections.Generic; |
6 |
|
using System.Linq; |
52 |
|
{ |
53 |
|
bool isSystem = false; |
54 |
|
string proc_user = ThreadControl.GetProcessOwner(proc.Handle, out isSystem).ToLower(); |
55 |
+ |
#if !ALLOW_SYSTEM_PROCESSES_TO_BE_INLUCDED |
56 |
|
if (isSystem) |
57 |
|
{ |
58 |
|
#if !DISALLOW_VERBOSE_LOGGING |
60 |
|
#endif |
61 |
|
continue; |
62 |
|
} |
63 |
+ |
#endif |
64 |
|
ProcContainer container = null; |
65 |
|
try |
66 |
|
{ |