Skip to content

Commit 27d4fb0

Browse files
committed
Use sa_sigaction instead of sa_union for AIX.
1 parent ebd3841 commit 27d4fb0

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/unix.rs

Lines changed: 1 addition & 8 deletions
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)