Re: Win32 rename()/unlink() questions

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win32 rename()/unlink() questions
Date: 2002-09-19 05:31:19
Message-ID: 3D896127.2070103@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
>>On Wed, Sep 18, 2002 at 08:01:42PM -0400, Bruce Momjian wrote:
>>
>>
>>>Second, when you unlink() a file on Win32, do applications continue
>>>accessing the old file contents if they had the file open before the
>>>unlink?
>>
>>I'm pretty sure it errors with 'file in use'. Pretty ugly, huh?
>
>
> Yeah - the windows filesystem is pretty poor when it comes to multiuser
> access. That's why even as administrator I cannot delete borked files and
> people's profiles and stuff off our NT server - the files are always 'in
> use'. Even if you kick all users off, reboot the machine, do whatever.
> It's terrible.
>
> Chris
>

Yep. That's why often it requires rebooting to uninstall
software. How can the installer remove itself? Under Windows
95/98/ME, you have to manually add entries to WININIT.INI. With
Windows NT/XP/2K, MoveFileEx() with a NULL target and the
MOVEFILE_DELAY_UNTIL_REBOOT flag will add the appropriate
entries into the system registry so that the next time the
machine reboots it will remove the files specified. Its a real
pain and a real hack of an OS.

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-09-19 05:57:12 Re: Inconsistent Conversion Names
Previous Message Christopher Kings-Lynne 2002-09-19 05:24:01 Re: Win32 rename()/unlink() questions