Skip to content

Commit 665135d

Browse files
authored
Use sa_sigaction instead of sa_union for AIX. (#109)
1 parent 9358531 commit 665135d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2021"
1313
rust-version = "1.63"
1414

1515
[target.'cfg(unix)'.dependencies]
16-
libc = "0.2.87"
16+
libc = "0.2.171"
1717

1818
[target.'cfg(unix)'.dev-dependencies]
1919
nix = { version = "0.28.0", features = ["fs"] }

Diff for: src/unix.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,7 @@ pub(crate) fn spawn_helper(
394394
let mut err = None;
395395
USR1_INIT.call_once(|| unsafe {
396396
let mut new: libc::sigaction = mem::zeroed();
397-
#[cfg(target_os = "aix")]
398-
{
399-
new.sa_union.__su_sigaction = sigusr1_handler;
400-
}
401-
#[cfg(not(target_os = "aix"))]
402-
{
403-
new.sa_sigaction = sigusr1_handler as usize;
404-
}
397+
new.sa_sigaction = sigusr1_handler as usize;
405398
new.sa_flags = libc::SA_SIGINFO as _;
406399
if libc::sigaction(libc::SIGUSR1, &new, ptr::null_mut()) != 0 {
407400
err = Some(io::Error::last_os_error());

0 commit comments

Comments
 (0)