mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix unix compiler error
This commit is contained in:
@@ -5,7 +5,7 @@ use std::{path::Path, path::PathBuf, process::Command as Process, time::Duration
|
|||||||
|
|
||||||
pub fn wait_for_pid_to_exit(pid: u32, ms_to_wait: u32) -> Result<()> {
|
pub fn wait_for_pid_to_exit(pid: u32, ms_to_wait: u32) -> Result<()> {
|
||||||
info!("Waiting {}ms for process ({}) to exit.", ms_to_wait, pid);
|
info!("Waiting {}ms for process ({}) to exit.", ms_to_wait, pid);
|
||||||
let mut handle = waitpid_any::WaitHandle::open(id)?;
|
let mut handle = waitpid_any::WaitHandle::open(pid)?;
|
||||||
let result = handle.wait_timeout(Duration::from_millis(ms_to_wait as u64))?;
|
let result = handle.wait_timeout(Duration::from_millis(ms_to_wait as u64))?;
|
||||||
if result.is_some() {
|
if result.is_some() {
|
||||||
info!("Parent process exited.");
|
info!("Parent process exited.");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use std::{path::Path, path::PathBuf, process::Command as Process, time::Duration
|
|||||||
|
|
||||||
pub fn wait_for_pid_to_exit(pid: u32, ms_to_wait: u32) -> Result<()> {
|
pub fn wait_for_pid_to_exit(pid: u32, ms_to_wait: u32) -> Result<()> {
|
||||||
info!("Waiting {}ms for process ({}) to exit.", ms_to_wait, pid);
|
info!("Waiting {}ms for process ({}) to exit.", ms_to_wait, pid);
|
||||||
let mut handle = waitpid_any::WaitHandle::open(id)?;
|
let mut handle = waitpid_any::WaitHandle::open(pid)?;
|
||||||
let result = handle.wait_timeout(Duration::from_millis(ms_to_wait as u64))?;
|
let result = handle.wait_timeout(Duration::from_millis(ms_to_wait as u64))?;
|
||||||
if result.is_some() {
|
if result.is_some() {
|
||||||
info!("Parent process exited.");
|
info!("Parent process exited.");
|
||||||
|
|||||||
Reference in New Issue
Block a user