Skip to content

Commit

Permalink
fix windows compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Dec 27, 2023
1 parent b442701 commit b9511ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ cfg_if! {
pub fn try_set_fd_limit(limit: u64) -> std::io::Result<u64> {
cfg_if::cfg_if! {
if #[cfg(target_os = "windows")] {
Ok(rlimit::setmaxstdio(limit as u32)?.map(|v| v as u64))
Ok(rlimit::setmaxstdio(limit as u32).map(|v| v as u64))
} else if #[cfg(unix)] {
rlimit::increase_nofile_limit(limit)
}
Expand Down
1 change: 1 addition & 0 deletions core/src/runtime/services/kaspa/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ impl super::Kaspad for Daemon {
if this.inner.termination_method == TerminationMethod::Sigterm && is_unix {
let pid = this.inner.pid.lock().unwrap();
if let Some(pid) = *pid {
#[cfg(unix)]
this.sigterm(pid);
}
} else if let Err(err) = child.start_kill() {
Expand Down

0 comments on commit b9511ab

Please sign in to comment.