bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp hangs when copying pipes


From: Andrew Burgess
Subject: Re: cp hangs when copying pipes
Date: Wed, 3 Apr 2002 08:22:00 -0800

>However the behavior you are
>seeing is expected and used to this effect by other programs.  I do
>not believe it should be changed as it would break programs that
>depend upon this working like it does and it would leave them without
>an important capability.

Thank you for taking the time to compose such an informative reply.

I agree that reading a pipe or socket should block until someone writes it.
What I need is a way to tell cp to not read them but just copy them
without having to give it the -R option, since I don't want recursion.

What do you think about -p forcing this behavior? Or adding another flag
(or flags if you want to seperate pipes from sockets) such as
--dont-read-pipes --dont-read-sockets ?

Or +R to reverse the effects of -R (because -a is -dpR) so I could
do cp -a +R ?

Or a number to specify the depth of recursion so I could use 1?

What I do now is run `find . ! -type d ! -type s ! -type p -maxdepth 1' to 
generate
the list of files for cp to examine which seems hacky (not to mention slow).

Thanks very much
Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]