Skip to content

Commit 1f741cd

Browse files
fix(procmgr): terminate suspended child when ResumeThread fails on Windows
Kill the suspended process and drop the retained job/profile instead of leaving them until daemon exit when resume fails after CreateProcessAsUserW.
1 parent 8d0256c commit 1f741cd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/procmgr/rust/src/process.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ pub struct ManagedProcess {
104104
last_start_conditions_met: Option<bool>,
105105
#[cfg(windows)]
106106
job_object: Option<platform::JobObject>,
107+
#[cfg(windows)]
108+
user_profile: Option<platform::UserProfileGuard>,
107109
}
108110

109111
impl ManagedProcess {
@@ -135,6 +137,8 @@ impl ManagedProcess {
135137
last_start_conditions_met: None,
136138
#[cfg(windows)]
137139
job_object: None,
140+
#[cfg(windows)]
141+
user_profile: None,
138142
}
139143
}
140144

0 commit comments

Comments
 (0)