Refactored internals for builtins inside of pipelines

This commit is contained in:
2026-02-24 10:54:24 -05:00
parent cab7a0fea7
commit 622e9f4a1e
14 changed files with 440 additions and 191 deletions

View File

@@ -46,6 +46,10 @@ pub fn signals_pending() -> bool {
SIGNALS.load(Ordering::SeqCst) != 0 || SHOULD_QUIT.load(Ordering::SeqCst)
}
pub fn sigint_pending() -> bool {
SIGNALS.load(Ordering::SeqCst) & (1 << Signal::SIGINT as u64) != 0
}
pub fn check_signals() -> ShResult<()> {
let pending = SIGNALS.swap(0, Ordering::SeqCst);
let got_signal = |sig: Signal| -> bool { pending & (1 << sig as u64) != 0 };