Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/uu/cat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ path = "src/cat.rs"
clap = { workspace = true }
memchr = { workspace = true }
thiserror = { workspace = true }
uucore = { workspace = true, features = ["fast-inc", "fs", "pipes"] }
uucore = { workspace = true, features = ["fast-inc", "fs", "pipes", "signals"] }
fluent = { workspace = true }

[target.'cfg(unix)'.dependencies]
Expand Down
6 changes: 1 addition & 5 deletions src/uu/cat/src/cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ use std::os::unix::fs::FileTypeExt;
use thiserror::Error;
use uucore::display::Quotable;
use uucore::error::UResult;
#[cfg(not(target_os = "windows"))]
use uucore::libc;
use uucore::translate;
use uucore::{fast_inc::fast_inc_one, format_usage};

Expand Down Expand Up @@ -225,9 +223,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
// (see https://github.com/rust-lang/rust/issues/62569), so we restore it's
// default action here.
#[cfg(not(target_os = "windows"))]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
let _ = uucore::signals::enable_pipe_errors();

let matches = uucore::clap_localization::handle_clap_result(uu_app(), args)?;

Expand Down
4 changes: 1 addition & 3 deletions src/uu/env/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,9 +1098,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
// Rust ignores SIGPIPE (see https://github.com/rust-lang/rust/issues/62569).
// We restore its default action here.
#[cfg(unix)]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
let _ = uucore::signals::enable_pipe_errors();
EnvAppData::default().run_env(args)
}

Expand Down
2 changes: 1 addition & 1 deletion src/uu/tail/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ clap = { workspace = true }
libc = { workspace = true }
memchr = { workspace = true }
notify = { workspace = true }
uucore = { workspace = true, features = ["fs", "parser-size"] }
uucore = { workspace = true, features = ["fs", "parser-size", "signals"] }
same-file = { workspace = true }
fluent = { workspace = true }

Expand Down
4 changes: 1 addition & 3 deletions src/uu/tail/src/tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
// (see https://github.com/rust-lang/rust/issues/62569), so we restore it's
// default action here.
#[cfg(not(target_os = "windows"))]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
let _ = uucore::signals::enable_pipe_errors();

let settings = parse_args(args)?;

Expand Down
2 changes: 1 addition & 1 deletion src/uu/tr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "src/tr.rs"
[dependencies]
nom = { workspace = true }
clap = { workspace = true }
uucore = { workspace = true, features = ["fs"] }
uucore = { workspace = true, features = ["fs", "signals"] }
fluent = { workspace = true }
bytecount = { workspace = true, features = ["runtime-dispatch-simd"] }

Expand Down
6 changes: 1 addition & 5 deletions src/uu/tr/src/tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ use std::io::{stdin, stdout};
use uucore::display::Quotable;
use uucore::error::{UResult, USimpleError, UUsageError};
use uucore::fs::is_stdin_directory;
#[cfg(not(target_os = "windows"))]
use uucore::libc;
use uucore::translate;
use uucore::{format_usage, os_str_as_bytes, show};

Expand All @@ -38,9 +36,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
// (see https://github.com/rust-lang/rust/issues/62569), so we restore it's
// default action here.
#[cfg(not(target_os = "windows"))]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
let _ = uucore::signals::enable_pipe_errors();

let matches = uucore::clap_localization::handle_clap_result(uu_app(), args)?;

Expand Down
Loading