file test for file being open by another process?

mikeraz at mikeraz at
Wed Jun 12 17:10:30 CDT 2002

reviewing `man perlfunc` didn't solve this for me.

I'd like to know if another process has a file open on a system.
The file in question is being copied from one system on a network
to another (read:  Windows users are copying files from their local
drive to the Samba share point on my Linux server.) 

When it fully arrives on the second system my process should begin 
to work on it.  

I was hoping to structure the code like:

if ( ! -X filename ) {
	process away;

Where X would be the appropriate file test for "open by another process".

If that is not available I'll monitor for stabilization of size and [mca]time.

Unless you have a better suggestion ... :)

    Michael Rasmussen  aka  mikeraz
   Be appropriate && Follow your curiosity

   "They that give up essential liberty to obtain
   temporary safety, deserve neither liberty nor safety."
				-- Benjamin Franklin 	

   and the fortune cookie says:
Tax reform means "Don't tax you, don't tax me, tax that fellow behind
the tree."
		-- Russell Long

More information about the Pdx-pm-list mailing list