Re: RE: [PHP] Check for open file

From: Date: Fri, 04 Mar 2011 06:21:42 +0000
Subject: Re: RE: [PHP] Check for open file
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-311656@lists.php.net to get a copy of this message
On Mar 4, 2011 4:53 AM, "Ashley M. Kirchner" <ashley@pcraft.com> wrote: > > > -----Original Message----- > > From: Ashley Sheridan [mailto:ash@ashleysheridan.co.uk] > > Sent: Thursday, March 03, 2011 2:03 PM > > To: sstaples@mnsi.net > > Cc: php-general@lists.php.net > > Subject: RE: [PHP] Check for open file > > > > > > As far as I was aware, if you're in the middle of writing to a file and another > > script was attempting to write to it, the OS would prevent that as you had an > > open lock on it. > > > > -- > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > And as it turned out, that was not the case. I started copying a 200MiB file from my desktop machine onto the Samba share. While that was copying, I got onto the server and tried to copy the file to /tmp and it happily did that for me without any indication that it was still being written to (which is was by the way.) So, that's not a good way of dealing with this. > > I think I'm going to have to go with a time delay function here ... > If on Linux, you can check for open file with lsof, I think the command is called. Regards Peter > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#311656) next »