uutils / uutils/tar

TarError::Io returns exit code 2, GNU tar returns exit code 141

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
49
Forks
13
Avg merge
5h 23m
Merged PRs (30d)
13

Description

In extract.rs, code like this

out.flush().map_err(TarError::Io)?;

UError::code reports as 2, with the io error printed to stderr - is non-conventional. GNU tar on tar tf foo.tar | head -1 exits via SIGPIPE (status 141) silently

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in extract.rs at the out.flush() call that maps failures to TarError::Io. Reproduce the issue with tar tf foo.tar | head -1 and inspect the resulting exit status and stderr; done means the broken-pipe case matches GNU tar's silent status 141 behavior instead of reporting code 2.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.