Peter Boncz wrote: > Update of /cvsroot/monetdb/MonetDB/src/gdk > In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19538 > > Modified Files: > gdk_posix.mx > Log Message: > - try making the file writable if CreateFile fails
I doubt that this will work since Windows reports: "The process cannot
access the file because it is being used by another process."
>
>
> Index: gdk_posix.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_posix.mx,v
> retrieving revision 1.150
> retrieving revision 1.151
> diff -u -d -r1.150 -r1.151
> --- gdk_posix.mx 19 Dec 2007 18:58:33 -0000 1.150
> +++ gdk_posix.mx 20 Dec 2007 08:45:23 -0000 1.151
> @@ -1290,8 +1290,12 @@
>
> h1 = CreateFile(path, mode0, mode1, &sa, OPEN_ALWAYS, mode2, NULL);
> if (h1 == INVALID_HANDLE_VALUE) {
> - GDKsyserror("MT_mmap: CreateFile('%s', %lu, %lu, &sa, %lu, %lu,
> NULL) failed\n", path, mode0, mode1, (DWORD) OPEN_ALWAYS, mode2);
> - return (void *) -1;
> + (void) SetFileAttributes(path, FILE_ATTRIBUTE_NORMAL);
> + h1 = CreateFile(path, mode0, mode1, &sa, OPEN_ALWAYS, mode2,
> NULL);
> + if (h1 == INVALID_HANDLE_VALUE) {
> + GDKsyserror("MT_mmap: CreateFile('%s', %lu, %lu, &sa,
> %lu, %lu, NULL) failed\n", path, mode0, mode1, (DWORD) OPEN_ALWAYS, mode2);
> + return (void *) -1;
> + }
> }
>
> h2 = CreateFileMapping(h1, &sa, mode3, (DWORD) ((((gdk_int64) off +
> (gdk_int64) len) >> 32) & LL_CONSTANT(0xFFFFFFFF)), (DWORD) ((off + len) &
> LL_CONSTANT(0xFFFFFFFF)), NULL);
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Monetdb-checkins mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
--
Sjoerd Mullender
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Monetdb-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
