| Crates.io | tg-signal |
| lib.rs | tg-signal |
| version | 0.1.0-preview.1 |
| created_at | 2026-01-22 13:11:49.012957+00 |
| updated_at | 2026-01-22 13:11:49.012957+00 |
| description | Signal handling for rCore tutorial OS. |
| homepage | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| repository | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| max_upload_size | |
| id | 2061510 |
| size | 7,151 |
Signal handling abstractions for the rCore tutorial operating system.
This crate defines the Signal trait and related types for Unix-like signal handling in the rCore tutorial kernel. It provides the interface that signal implementations must follow.
tg-signal-defsuse tg_signal::{Signal, SignalAction, SignalNo, SignalResult};
// Implement the Signal trait for your signal handler
impl Signal for MySignalHandler {
fn from_fork(&mut self) -> Box<dyn Signal> { /* ... */ }
fn add_signal(&mut self, signal: SignalNo) { /* ... */ }
fn handle_signals(&mut self, ctx: &mut LocalContext) -> SignalResult { /* ... */ }
// ... other methods
}
Signal - Trait defining the signal handling interfaceSignalResult - Result type for signal handling operations (NoSignal, Handled, ProcessKilled, etc.)SignalAction - Signal handler configuration structureSignalNo - Signal number enumerationtg-signal-defs - Signal number and action definitionstg-signal-impl - A concrete implementation of the Signal traitLicensed under either of MIT license or Apache License, Version 2.0 at your option.