Skip to content

Commit

Permalink
WIP try to fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
rklaehn committed Oct 24, 2022
1 parent ee5fa31 commit c77dc11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iroh-util/src/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::io::ErrorKind;
use std::io::Write;
use std::path::PathBuf;
use std::process;
use sysinfo::PidExt;
use sysinfo::{Pid, ProcessExt, ProcessStatus::*, System, SystemExt};
use thiserror::Error;
use tracing::warn;
Expand Down Expand Up @@ -192,9 +193,9 @@ fn read_lock(path: &PathBuf) -> Result<Pid, LockError> {
file.read_to_string(&mut pid)
.map_err(|_| LockError::CorruptLock(path.clone()))?;
let pid = pid
.parse::<i32>()
.parse::<u32>()
.map_err(|_| LockError::CorruptLock(path.clone()))?;
Ok(Pid::from(pid))
Ok(Pid::from_u32(pid))
}

/// LockError is the set of known program lock errors
Expand Down

0 comments on commit c77dc11

Please sign in to comment.