mirror of
https://github.com/uutils/coreutils.git
synced 2026-05-06 07:26:38 -04:00
fix(env): skip uncatchable signals on OpenBSD when applying to all signals
This commit is contained in:
@@ -279,3 +279,4 @@ Nofile
|
||||
rprocess
|
||||
statat
|
||||
getdents
|
||||
SIGTHR
|
||||
|
||||
Vendored
+10
-1
@@ -1080,7 +1080,16 @@ where
|
||||
let Ok(sig) = signal_from_value(sig_value) else {
|
||||
return Ok(());
|
||||
};
|
||||
signal_fn(sig)?;
|
||||
match signal_fn(sig) {
|
||||
Ok(()) => {}
|
||||
Err(_) if !explicit => {
|
||||
// When applying to all signals, silently skip signals that
|
||||
// the OS refuses to change (e.g. SIGTHR on OpenBSD).
|
||||
// GNU env also ignores these.
|
||||
return Ok(());
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
}
|
||||
log.record(sig_value, action_kind, explicit);
|
||||
|
||||
// Set environment variable to communicate to Rust child processes
|
||||
|
||||
Reference in New Issue
Block a user