Skip to content

WTERMSIG (and others) are unsafe on macOS, but safe on Linux #1888

Closed
@Thomasdezeeuw

Description

@Thomasdezeeuw

WTERMSIG and related functions have been changed to no longer require unsafe, seemingly in commit 5a1df22. However on macOS these functions are still unsafe. See the definition on Linux https://docs.rs/libc/0.2.77/libc/fn.WTERMSIG.html (no unsafe) vs. macOS https://docs.rs/libc/0.2.77/x86_64-apple-darwin/libc/fn.WTERMSIG.html (requires unsafe). Was it intentional to leave macOS out?

Also this causes warnings, e.g. see https://github.com/rust-lang/rust/pull/76561/checks?check_run_id=1096958697#step:23:213 (https://github.com/rust-lang/rust/commit/7c3e1ffd7a945b4044e5e80d7d74ba944ff54d0f/checks/1096958697/logs).

/cc @joshtriplett who wrote the commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions