[comp.unix.questions] check to see if cp is complete

pdressne@netxcom.UUCP (Peter Dressner) (05/25/89)

   We have a problem in that a polling process may open a file
   that is being copied (using cp or rcp) at that moment.

   What is desired is that the file be left alone until
   the cp is complete.

   How can one tell when a cp is complete. There is nothing
   in the inode that says this file is open. You could check
   the creation date and wait until the file is X seconds old
   but that is clumsy and not 100% reliable.

   Does cp and rcp, by convention, lock a file while it is
   being copied?

   If not, does anyone have good ideas as to how to accomplish 
   this.


   Thanks in advance.


   Peter Dressner, NetExpress Communications.