diff options
| author | wznmickey <first@wznmickey.com> | 2024-11-29 04:21:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-29 09:21:19 +0000 |
| commit | 3ab131c22ca6e7ef9e28d6352a96bb0846fc608b (patch) | |
| tree | 60e11d2c13ea97e197d72688e95b761b20f74746 /crates/typst-cli/src | |
| parent | 9ce40cb91fd5c6d088c30cc99c3e41e618e6c6fc (diff) | |
Handle SIGPIPE (#5444)
Diffstat (limited to 'crates/typst-cli/src')
| -rw-r--r-- | crates/typst-cli/src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/typst-cli/src/main.rs b/crates/typst-cli/src/main.rs index 631befe5..e4861d6f 100644 --- a/crates/typst-cli/src/main.rs +++ b/crates/typst-cli/src/main.rs @@ -44,6 +44,10 @@ static ARGS: LazyLock<CliArguments> = LazyLock::new(|| { /// Entry point. fn main() -> ExitCode { + // Handle SIGPIPE + // https://stackoverflow.com/questions/65755853/simple-word-count-rust-program-outputs-valid-stdout-but-panicks-when-piped-to-he/65760807 + sigpipe::reset(); + let res = dispatch(); if let Err(msg) = res { |
