cp: refuses to overwrite binary in use
Open
Nobody has claimed this yet.
U - cp
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
In a lxc Ubuntu Questing container with a git main build of the rust coreutils
$ sudo cp .cargo/bin/coreutils /usr/bin/coreutils
cp: '.cargo/bin/coreutils' -> '/usr/bin/coreutils': Text file busy (os error 26)
while
$ sudo gnucp .cargo/bin/coreutils /usr/bin/coreutils
$
use the -f flag isn't making a difference either
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the specified LXC Ubuntu Questing container using the Rust coreutils build, then compare it with GNU cp and the -f behavior. Trace the cp implementation and existing tests for overwriting an in-use binary; done means the Rust cp handles this case consistently with GNU cp and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100