delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/07/08:17:18

From: "Tanes Sriviroolchai" <Tanes DOT Sriviroolchai AT Thailand DOT NCR DOT COM>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990406092755 DOT 6187I-100000 AT is>
Subject: Re: file locking
Date: Wed, 7 Apr 1999 10:28:56 +0700
Lines: 22
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <ugX21aKg#GA.184@rpc1284.daytonoh.ncr.com>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019