[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Simultaneous file access.

gautamg@xxxxxxxx forced the electrons to say:
> I am stuck with a problem about simultaneous access of a file by two apps.
> The file is being ftped into a directory. The point is that I must not start
> reading it until the ftp of the file is complete.

This problem was posted about 5 years ago on comp.unix.programmer. One
of the solutions suggested (easiest to implement) was that the FTP
client will ftp in the data file, and afterwards another file of zero
length. Your application can verify whether the FTP has been completed
by verifying the existence of this zero length file. If it exists,
then transfer is complete, so remove this file and open the data file.


The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. (binand@xxxxxxxxxxxxxxxxxxxxx)