Skip to content

Commit

Permalink
fix: Windows service arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Feb 20, 2025
1 parent 782c9cf commit 54dc260
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pueue/src/daemon/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ impl EnvBlock {
fn new(token: HANDLE) -> Result<Self> {
let mut env = ptr::null_mut();
unsafe {
CreateEnvironmentBlock(&mut env, token, false)?;
CreateEnvironmentBlock(&mut env, Some(token), false)?;
}

Ok(Self(env))
Expand Down Expand Up @@ -660,9 +660,9 @@ impl Spawner {
let mut process_info = PROCESS_INFORMATION::default();
unsafe {
CreateProcessAsUserW(
token,
Some(token),
PWSTR(current_exe.as_mut_ptr()),
PWSTR(arguments.as_mut_ptr()),
Some(PWSTR(arguments.as_mut_ptr())),
None,
None,
false,
Expand Down

0 comments on commit 54dc260

Please sign in to comment.