@@ -32,9 +32,7 @@ pub enum Error {
32
32
FindProcessPath ( #[ error( source) ] io:: Error , u32 ) ,
33
33
}
34
34
35
- pub struct ProcessMonitor {
36
- states : ProcessStates ,
37
- }
35
+ pub struct ProcessMonitor ( ( ) ) ;
38
36
39
37
#[ derive( Debug ) ]
40
38
pub struct ProcessMonitorHandle {
@@ -45,9 +43,6 @@ pub struct ProcessMonitorHandle {
45
43
46
44
impl ProcessMonitor {
47
45
pub async fn spawn ( ) -> Result < ProcessMonitorHandle , Error > {
48
- // TODO: need handle that can add excluded procs, etc.
49
- // TODO: probably do need mutex
50
-
51
46
let states = ProcessStates :: new ( ) ?;
52
47
53
48
let excluded_paths = vec ! [ ] ;
@@ -82,8 +77,6 @@ impl ProcessMonitor {
82
77
let mut inner = states_clone. inner . lock ( ) . unwrap ( ) ;
83
78
inner. handle_message ( val) ;
84
79
}
85
-
86
- // TODO: signal complete shutdown here?
87
80
} ) ;
88
81
89
82
Ok ( ProcessMonitorHandle {
@@ -173,7 +166,7 @@ impl ProcessStates {
173
166
pub fn exclude_paths ( & self , paths : Vec < PathBuf > ) {
174
167
let mut inner = self . inner . lock ( ) . unwrap ( ) ;
175
168
176
- for ( pid , info) in & mut inner. processes {
169
+ for ( _pid , info) in & mut inner. processes {
177
170
// Remove no-longer excluded paths from exclusion list
178
171
let mut new_exclude_paths: Vec < _ > = info
179
172
. excluded_by_paths
@@ -391,7 +384,6 @@ struct ESAuditToken {
391
384
392
385
#[ derive( Debug , Deserialize ) ]
393
386
struct ESProcess {
394
- ppid : u32 ,
395
387
audit_token : ESAuditToken ,
396
388
executable : ESExecutable ,
397
389
}
0 commit comments