Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp does not copy named pipes #1710

Closed
jaggededgedjustice opened this issue Jan 31, 2021 · 2 comments
Closed

cp does not copy named pipes #1710

jaggededgedjustice opened this issue Jan 31, 2021 · 2 comments
Labels

Comments

@jaggededgedjustice
Copy link
Contributor

If you try to copy a named pipe cp will fail with cp: error: '<source>' -> '<dest>': the source path is not an existing regular file. You can see this with the following test:

mkfifo /tmp/fifo
cp /tmp/fifo /tmp/fifo-cp &
echo test >/tmp/fifo 

This will not error with GNU cp, and will create /tmp/fifo-cp with the contents echoed into /tmp/fifo

@sylvestre
Copy link
Sponsor Contributor

Probably the same as
rust-lang/rust#79390

@jfinkels
Copy link
Collaborator

This seems to be fixed:

$ mkfifo fifo
$ ./target/debug/cp fifo fifo2 &
[1] 977284
$ echo test > fifo
$ cat fifo2
test
[1]+  Done                    ./target/debug/cp fifo fifo2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants