Message-ID: <001501be80a7$3216c780$ad887fc0@tanes> From: "Tanes Sriviroolchai" To: X-Mailer: Microsoft Outlook Express 4.72.3110.5 Subject: Re: file locking Date: Wed, 7 Apr 1999 10:28:56 +0700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote in message ... > > >> second of all, if you lock a file and another instance tries to write to >> it, what happens? how can you see if a file or region is locked? > >On DOS/Windows or on Unix? > >On Unix, the other process which tries to write blocks until the file >is unlocked. On DOS/Windows I think the write call fails, but you'll >need to try to make sure. It should be "On Unix, the other process which tried to write without test lock before will be successful. However, if that process test lock (with blocked) before write it will be blocked until that file is unlocked. Or it will be failed if that process test lock without block." Regards, Tanes Sriviroolchai