Closing TMapFiles

From: Peter Steinberg (steinber@nevis1.nevis.columbia.edu)
Date: Fri Jul 16 1999 - 21:37:33 MEST


Hello -

I'm having a problem using TMapFiles to communicate between two
processes on NT4.

Since I want two-way communication, each process (let's call them
A and B) "RECREATE"'s a mapfile for writing to the other process
and then "READ"'s the other process's file.

so we have two mapfiles showing up:
1. c:\AtoB.map
2. c:\BtoA.map

Now suppose process A crashes while B is reading AtoB.map.  In
principle, B can detect this and Close() the mapfile which is
dealing with reading AtoB.map.  Then when A comes back, it can
again perform a "RECREATE" on c:\AtoB.map and then B can reopen it.

However, this does _not_ work.  Even after closing the mapfile object
which performs the read (the docs say not to delete the object!) i
am unable to recreate it -- the error is:
Error in <TMapFile::TMapFile>: file c:\AtoB.map already exists

Is this a bug or feature?

Regards,
Peter

---------------------------------------------------------------------------
Peter Steinberg, Columbia University         mailto:Peter.Steinberg@Cern.ch
Nevis Laboratories               +  http://www.nevis.columbia.edu/~steinber
P.O. Box 137                  _  O  _            Home Phone: (212) 678-5971
(or 136 South Broadway)	     ( `-|-' )     Nevis: (914) 591-2817 (fax 8120)
Irvington, NY 10533           _+|+_/              Campus:   (212) 854-4653
			       -----		    	PCS: (917) 549-3094
							BNL: (516) 344-7843
---------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET