delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/24/04:01:51

Date: Sun, 24 Jan 1999 10:58:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: leva AT hotmail DOT com
cc: djgpp AT delorie DOT com
Subject: Re: interprocess synchronization and "Sharing violation"
In-Reply-To: <78b8k7$um0$1@nnrp1.dejanews.com>
Message-ID: <Pine.SUN.3.91.990124105832.4501P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Sat, 23 Jan 1999 leva AT hotmail DOT com wrote:

>  Thanks to DJ, O_EXCL is working NOW as it should - I have a single lock file
> to be owned and use __dpmi_yield() if the lock is busy. Now it works wonderful
> under Windows 95. Unfortunately this approach fails on Windows 3.11. Windows
> complain about Sharing Violation :-(. Perhaps somebody can suggest something
> here?

You could try calling DOS function 6Ch directly (rather than `open' or
`_open') and use the different sharing bits defined for that
function.  Since it is easy to find out what version of Windows you
are running on, there should be no problem to have your program behave
differently on each version of Windows, should that be necessary.

> 1. Is there any way to make windows 3.11 return with error rather than pop a
>      messagebox to user?

Keep dreaming...

> 2. Is there any way to synchronize processes without relying on the file
>      system?

I cannot think of anything else, as far as DJGPP programs are concerned.

- Raw text -


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