Skip to content

Generalize signal.rs to be used on non-Linux systems#263

Open
slp wants to merge 4 commits intorust-vmm:mainfrom
slp:generalize-signal-unix
Open

Generalize signal.rs to be used on non-Linux systems#263
slp wants to merge 4 commits intorust-vmm:mainfrom
slp:generalize-signal-unix

Conversation

@slp
Copy link
Contributor

@slp slp commented Feb 9, 2026

Summary of the PR

Most of the functionality in signal can be used on non-Linux systems. This PR gates the Linux-specific functionality behind build-time conditionals and moves the signal module from linux to unix.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

slp added 3 commits February 9, 2026 16:10
The syscall sigtimedwait is not available on some non-Linux systems.
Let's use sigwait on them as a first step to be able to generalize
signal.rs

Signed-off-by: Sergio Lopez <slp@redhat.com>
The functions __libc_current_sigrtmin and __libc_current_sigrtmax are
generally not available on non-Linux systems. Exclude them, and all the
methods using them, to be able to generalize signal.rs.

Signed-off-by: Sergio Lopez <slp@redhat.com>
In the previous commits we've prepared signal.rs to be usable on
non-Linux systems. Let's commit to it by moving the signal module from
linux to unix.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant